Adding missing "group by" see BT#6223