I've bumped into this case in RUM extension. The need to build it with tuplesort changes in different PG versions led me to reluctantly including different tuplesort.c versions into the extension code. So I totally support the intention of this patch and I'm planning to invest some time to review it.