comparison: improve handling of "if (foo + 1 > limit) "