Fix leak in leak detection code

If ensure_clean_request_context found a leak, it would raise an AssertionError
and not clean up the leak, and therefore affect other testcases.