Some issues display "new branch" button even if there's a branch that exists
Description
For some issues that always display the "new branch" button even though the correct currently a branch that exists. If the 'new branch' button is pressed it shows the user a page with a red banner that says "Branch already exists" at the top.
Steps to Reproduce
-
Create issue
-
Create branch from issue
-
Create MR that 1) Does delete the branch and 2) Doesn't close the issue
-
Create another branch from with same name (using New Branch button)
-
Go to Step 3
Current bug behavior
When we make the branch not close the issue (for me was removing the Closes #[issue no] from the MR description) the New Branch button becomes available again.
Screenshots / logs
GitLab Version
9.0.5-ee

