Added a check for whether it's OK to perform unification depending on the values of the :not-same-as property of variables.