Range search upper bound check

Are we including or excluding the upper limit?
Fix, missing case for -s option