```
This commit does not change behavior
```
Partial backport of core [[https://github.com/bitcoin/bitcoin/pull/18740 | PR18740]]:
https://github.com/bitcoin/bitcoin/pull/18740/commits/6fca33b2edc09ed62dab2323c780b31585de1750#diff-2ae094f9329ce9498e1b4a9cb7767945b54a33b4ee9fed4f0ba401a98e1683c1
Depends on D7988 and D7989.