Changed reduce_eq_constraints so that it now also eliminates var = var constraints