No longer needed after core#17270
This is a backport of core#19090 [1/6]
https://github.com/bitcoin/bitcoin/pull/19090/commits/fa609c4f76f215c19ea4021e78c102dee2b8c3d1
Backport note: the original PR has 7 commits, but the last one is not relevant to our codebase.