Backport of gh-26615

Comment From: bclozel

Original change was introduced in 94824e30a4a8f23e4, so there's no need to backport this fix.