Better handle infinity in inequality solver.

fixes #8252 
That's ok.