Currently, in order to do constraint checking of a name with a template binding, the template must be fully instantiated (essentially macro expanded). If the Alf text being parsed and checked is contained within a larger model, the template instantiation then gets inserted into a namespace in the containing model, even if the Alf text has constraint violations and, therefore, is not mapped.
It would be better if constraint checking could be done using a "virtual instantiation" of the template, which would substitute template actual parameter for formal parameters dynamically as needed. The full template expansion would then only need to be done during mapping, once all constraint checks have passed.