Bugfixes

Fixed a number of bugs related to the recording and execution of traces,
including incorrect use of if- and cond-constructs and the lookup of
native symbols.