This is the only instance where validation reaches for something outside of it.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/21055 | core#21055]] [11/16]
https://github.com/bitcoin/bitcoin/pull/21055/commits/4744efc9bae8b22efb76152a3c045d054c880399
Depends on D11215