Fix check for environment variables in custom config tests.