I wrote:
> We might be able to salvage this by having find_hash_columns examine
> the Agg node's grpColIdx list and assume that columns listed there need
> to be preserved.
Hearing nothing from Jeff, I went ahead and pushed a fix along that line.
regards, tom lane