refreshDeclaredClasses() (http://docs.ros.org/hydro/api/pluginlib/html/class__loader__imp_8h_source.html#l00619) makes use of ros::package to find new plugins (see getPluginXmlPaths: http://docs.ros.org/hydro/api/pluginlib/html/class__loader__imp_8h_source.html#l00177). However, in the most cases newly available plugins are probably not yet in the cache. Hence getPluginXmlPaths() should use call rospack profile (or something similar) to update the cache before looking for new plugins.