Fixes AggregateQueryResult.hasNext returning true when on last offset.
Fixes getPathInfo returning null when servletPath was /.
Merge branch 'master' into feature/countperformance