Note that we unfortunately can't use a scripted diff here, as the
.hash symbol is also used for other instances (e.g. CInv)
This is a partial backport of core#32868
https://github.com/bitcoin/bitcoin/pull/32868/commits/2118301d77c20e31e8c280ed3bf3c7d67c07d3ca.
Depends on D18740