fix silly errors and type inconsistency
Extend the existing handling of having-without-aggs to include
lists of empty grouping sets.