When doing a map lookup with a string literal we should load as much of
the keys to at least match the length of the string literal, so that
the lookup doesn't fail with the "string too long" error.
Fixes#3034
Moves variable evaluation tests to pkg/proc which is where most of the
code they test exists, this also allows the removal of a bunch of
duplicate support code.