There was a slight logic error, where we were checking the lower bound instead of the upper bound. The current test cases didn't cover it because they didn't make sure that code path was tested. This PR adds test cases to reveal the bug, and implements the fix.
There was a slight logic error, where we were checking the lower bound instead of the upper bound. The current test cases didn't cover it because they didn't make sure that code path was tested. This PR adds test cases to reveal the bug, and implements the fix.
This change is