Resolve race condition in PluginClassLoader