fix group by queries on system tables with limit or the same aggregation...

... twice
maybe put that into a finally block?