Fix bug with nested groups not being created when using aggregators.