This should be done in top-level `before` and restored in `after` to prevent test leaks.