I've now pushed the patch that trims off the Pathkeys for the ORDER BY / DISTINCT aggregates.
Thanks for pushing!
Those results are a bit noisy. Perhaps a few more runs might yield more consistency, but it seems that there's not too much overhead to it. If I take the minimum value out of the 3 runs from each, it comes to about 1.5% extra time spent in planning. Perhaps that's OK.
I agree that the overhead is acceptable, especially it only happens in USE_ASSERT_CHECKING builds.