fix definition for components that have a non-standard 'main' entry poin...

I found using this in practice that certain modules that don't have a main=index.js were registered differently and thus couldn't be resolved.  This largely sorts it.