Fix deep-copying of the environment
os.environ
is not a normal dictionary. It is a special object that
modifies the environment of the application. And even after a deep
copy it will continue to modify the environment of the host application.
At least on Python 3.10.
TODO: I didn't run CI's linter, so it might break something. Let's wait for the CI pipelines.