2654 2659 env fixes

Also a very minor fix around using to_sym in the dynamic environments to be consistent with the static ones.