As per title, needed for coming changes.
They are fixed by core in commit
https://github.com/bitcoin/bitcoin/pull/17996/commits/c2bd5888607d283a229c9361747a93c83dfea0de
from the very unrelated PR17996, but since this PR has an infinite depth
of dependencies I just cherry pick this commit for now.