builtin-apply.c: refactor small part that matches context