JUCE_AUTORELEASEPOOL BAD_ACCESS in VST destructor

It looks like this issue is very similar to all of these:

I’ve tried injecting MessageManager::getInstance()->runDispatchLoopUntil (1000); in many different places but I still get the crash.