Make variable-exists() work correctly for local variables.
Pass a read only environment of the caller to ruby functions.