Merge pull request #22218 from colemanw/fixCanAggregate