fix Issue 12574 - [ICE](statement.c, line 713) with reduce with wrong tuple arity

Make `TemplateInstance::semanticTiargs` reentrant against semantic errors.
[Refactoring] Make long member function names short
[Refactoring] Add detailed comment