In reply to TC_2017:
The problem is the equality expression is comparing two class variables and the handles they contain, not a deep comparison of all its members. Also, the constraint solver will never modify a random class variable, only integral class member variables.