Fixes bug with reverse range scanning

USERGRID-1400