One of the two occurences in Bitcoin Core was already fixed in Bitcoin ABC.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/21391 | core#21391]] [13/14]
https://github.com/bitcoin/bitcoin/pull/21391/commits/f99913969f92b8b9cef1b83f5ee8e6a9267b4af0
Depends on D11587