Fixes FUNCTION and CLOSURE when /local not last refinement

Fixes http://issue.cc/r3/2109