This is an alternative approach to address inconsistencies pointed out in: D90078
This patch makes sure that the return address is reset, when leaving the scope.
In some cases, I had to move the macro out of an if-statement to have it in the right scope, in some cases I added an additional block to restrict the scope.
This patch does not handle inconsistencies, which might occur if the return address is still set when we call into the application.
In general, I would prefer to pass the address down the stack as function arguments, which is not possible with all the internal calls to external API functions