Fix range() when maxInclude=false (it was generating "gt" instead of "lt" criterion)