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