FEATURE/BUGFIX: State variables are now properly captured and restored for finally blocks to run correctly.

The code within a finally { } block can only work with the values
of state variables that were setup by the preceding code. It
cannot depend on what might happen later. Therefore when such
blocks are used, the state variables will need to be saved and
restored so that the finally operations can run correctly.