The local_env_helper ApiProxy proxy creates a new, empty HashMap every time getAttributes is called. Since namespace is kept in here, it will never be set persistently.
(getAttributes )
I just created an environment-attributes atom, return it from getAttributes, clear it in the environment clearing function. Works okay so far.