Refactor: scheduler: store environment variables as list
... instead of hash table, so regression test output remains consistent.
Also, the list implementation is much more efficient, as the only operations
done are insert (without duplicates) and iterate.