Fix TestResult memory leak when Exceptions are thrown from tests.