Clean up a global leak in tests