getNameForObject() in XMLDB generators stuff, should be used ONLY to calculate the name of objects being created. NEVER to guess the name of existing objects.
Review all the generators, changing such wrong uses, replacing them by DB introspection. It will make the naming schema 100% consistent.
For 1.8 we have done that to sequences and triggers under Oracle (
MDL-6880). Something similar should be applied to check constraints. Analyse.