fix Issue 11563 - Module dependency cycle causes unrelated template instantiations to fail