Regression in 1e5aa8e1c79252cc810af21294a6e945d11d37b3. Backport of b1bf8c8a4ba04049dc19217bf0e876488a4fae3c from main