We only need to do this once we're running destructors. The current approach interferes with some event loop code that runs everything inside a shutdown function.