Reduce/remove global mutable state
There are quite a few mutable package-level variables in both production code and tests. Downsides of global mutable state (GMS) are well known.
This issue tracks work to remove or at least reduce the amount of GMS as much as feasible with reasonable effort.