gitk: Avoid an error when cherry-picking if HEAD has moved on