builtin/apply: move 'has_include' global into 'struct apply_state'