Fix AutoPlugins declared at top-level

Fixes exception occuring when loading auto plugins, which are declared
as top-level classes