fix global 'group by' analysis
Merge pull request #611 from crate/l/fix-global-aggregates

fix global 'group by' analysis