builtin/apply.c: reduce scope of variables