Not really sure if this helps or even applies to your situation in the same way, but I've ran into issues which also involved the uniqueness constraint validation a while ago. This was on a Mendix 8 release though. Does the rest of the stacktrace include one or more nullpointer exceptions?
I had contact with Mx Support about this back then, and they pointed out that it was fixed with the newer Mx8.3 release, according to these release notes: We fixed a NullPointerException issue that occurred during database synchronization where the same name attribute was recreated. (Tickets 88584, 88663, 89063, 89138)
I'm not sure whether this fix is implemendet in a Mendix 7 release.