virttest/utils_env: fix the issue with RuntimeError

There is a log time a bug that the tests sometimes fails with exception
"RuntimeError: dictionary changed size during iteration".

The idea of this patch comes from Martin.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>