Fix for range queries when sorting in descending order.
Fix for range queries when sorting in descending order.

jacksonic/foam,mdittmer/foam,mdittmer/foam,foam-framework/foam,foam-framework/foam,jlhughes/foam,osric-the-knight/foam,foam-framework/foam,osric-the-knight/foam,mdittmer/foam,shepheb/foam,osric-the-knight/foam,jacksonic/foam,jlhughes/foam,foam-framework/foam,jlhughes/foam,jacksonic/foam,jlhughes/foam,jacksonic/foam,osric-the-knight/foam,foam-framework/foam,shepheb/foam,shepheb/foam,mdittmer/foam