Fix #318: need to use the branch name, not full ref path when calling lookUpBranchWithName