Minor perf optimization in PluginManager