Fix hash for internal_env.
Fix missing template parameter.
Code cleanup.
Forbid proto_view copy.