util.c: remove_equalities_p: correct check for end of equalities to skip