Bug 137191 - applying restrictions to size and depth of query