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