Refactor processing of inequalities with oo/-oo, fixes #7775
update with master