Apply any type selection criteria to GroupBy queries. Fixes #45