don't lose group by clause
Merge pull request #1270 from marcel-blonk/PLFM-2677

don't lose group by clause