FIX: avoid waiting forever on a locked CPluginDirectory while exiting