BranchOperation: fix checkout for tags and remote branches