Fix the KeyError due to the key not being present in Sk.Globals.

The fix was to remove the declaration of $gbl as a new object everytime
the switch statement was evaluated and to declare $loc, $gbl and $exc
right at the beginning.