checkout: avoid BUG() when hitting a broken repository (rhbz#2042920)
The git checkout command crashes when run multiple times, if
`.git/refs/remotes/origin/HEAD` is manually copied into
`.git/refs/heads/$branch-name`.
Strictly, this is repository corruption, but it has been silently
tolerated until upstream 9081a421 (checkout: fix "branch info" memory
leaks, 2021-11-16), which added some sanity checking of the data.
Loosen the check via Junio's upstream commit 519947b69a (checkout: avoid
BUG() when hitting a broken repository, 2022-01-21).