Change result, pos, newpos and paramindex variables to local in builtin/common/misc_helpers.lua