Bugfix

The global state was incorrectly manipulated when evaluating a call to a user-defined function