#2630 unit tested range query