ISPN-2852 CacheQuery.maxResults not honored everywhere

If 5.3.0 isn't going to be released really soon, we'd appreciate this patch going into 5.2.x as soon as possible.