simtest: Fix bug introduced by 24aabb3

The StatMonitor introduced in 24aabb3 threw an exception when
encountering symbolic code paths that themselves threw exceptions.
Handle this case correctly.
simtest: Fix UnboundLocalError when test function throws an exception