Support for dummy toolchain in the hierarchical module naming system

Would that be a reasonable fix for #980 ? It seems to work but I have no idea about potential side effects.
This should be an `elif`, to avoid intending everything one level deeper needlessly.