fix Issue 12287 - infinite loop on std.traits.moduleName on templated struct member

https://d.puremagic.com/issues/show_bug.cgi?id=12287