A query with two aggregate calls, sum(comm) and min(comm), it produces an incorrect plan. The main problem is that it fails to index the input of sum(comm) and min(comm) properly. This seems to only happen in the special case where there is only one distinct aggregate call.
AggregateExpandDistinctAggregatesRule produces the following plan in this case.
In the above plan, the top LogicalAggregate EXPR$1=[SUM($3]] is incorrect, it should be SUM($2).