Store local variables of a function in local_var_env