Fix legacy plugin hash population in #configure()

We need to compare the identity of the plugin constructor with the
registered constructors, rather than checking whether the plugin
object is an instance of the class. The reason is that the latter
gives false positives when plugins inherit from other registered
plugins.