This shows up when the interpretation is interrupted, in this case because we're reading an uninitialized value, and so we don't get to the destroy instruction for the scope.
This adds a destroyAll() that calls deallocates all the local variables of all the scopes in the function. This works, but I was wondering if it should instead be a cleanupLeftovers() that's only used by the caller _if_ the interpretation wasn't successful.
Rather than allow anyone with access to the function to call it, would it make sense to put the functionality directly in the destructor? It's not a huge amount of code, and it reduces the cognitive overhead of figuring out who can destroy what.