gitk: Fix some bugs in the new cherry-picking code