This code can now be invoked in the context of the Erlang client, in which case we are not guaranteed that the env key will be there at all.