Fix nested aether function calls from restoring unsandboxed state early

Try and track the call depth for Aether functions and only restore to unsandbox state if we are actually leaving the root call.

This implementation relies on all transpiled code to be done through the same aether instance, if multiple instances are used this will not work.