Fix CATCH/QUIT, CC#851, CC#1896.
, the bug causing test-framework crashes.