builtin/apply: make build_fake_ancestor() return -1 on error