Fix CATCH/QUIT, CC#851, CC#1896.

Fix [CC#851](http://issue.cc/r3/851), [CC#1896](http://issue.cc/r3/1896)
The bug was causing test-framework crashes.
Tested in Linux (0.4.4) with 3 progressions, no regression.