added support for grouping on an anonymous class.