fix Issue 11563 - Module dependency cycle causes unrelated template instantiations to fail
Merge pull request #2872 from 9rnsr/fix11563

[REG2.061] Issue 11563 - Module dependency cycle causes unrelated template instantiations to fail
Fix Issue 9081 - Modules shouldn't have a type