Better handle infinity in inequality solver. Fix for #8252