support for hierarchical module naming schemes

@geimer: this should fix the problem that's blocking you right now

I might need to figure out one more thing w.r.t. the devel module name before this really works for you, I'm looking into that...
this is quite a can of worms imho, so I've forked this in a separate PR #966 (I'll update that one once this one is merged in)