backport checkout-branch.sh to 'phase-1' again, something went wrong the first time