dev/core#518 Fix lybunt performance
Per analysis on the issue this gave me a substantial performance
increase (from nearly 7 minutes down to less than a quarter of a second)
when performing a lybunt report on a small group wihtin a large database.
In testing this patch we went from WSOD of death to nearly instant responsiveness.
I tried the query unfiltered (ie. against our whole DB) and it performed well
although not well enough I would want our users to run it on prod (~12 minutes)
- so I feel comfortable this doesn't regress performance when a group filter is
NOT in play