Improve ScanRangesTest.