Bug 845625 - Prevent tests from getting out of sync when an exception is thrown, r=mdas, a=test-only