Turns out this was already fixed in #21964.
I have no idea why GitHub showed an incorrect diff in #21273, or how applying the diff to master was even possible, but here we are.
5647dd84c1Alex Rønne Petersen committed on 1/27/2025, 4:52:29 AM· committed by Andrew Kelleyparentae5b1a9