Found while working on #32433. This branch will never be executed because we have would have already made the same check a couple lines above. (cherry picked from commit 355889dbc2432554f0bcdb22f918488849f0016c)