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