It is confusing and verbose to repeatedly access the global when a
member variable can simply refer to it.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/21789 | core#21789]] [1/2]
https://github.com/bitcoin/bitcoin/pull/21789/commits/fa389471251f043ec25e7b01e59b37d3b921ce54