Can't create a child branch with certain parent namespace if previously created - error is "Invalid reference name"

Description of the problem

We use namespaced branches to allow for better organising of branches. We've discovered an odd issue that happens when a 1st level namespaced branch is created, a 2nd level namespaced branch can not be created and shows an error with "Invalid reference name". We tested this with a brand new repo too with no custom settings too.

Steps to reproduce

  1. Created new repo.
  2. Create branch hello/world - (this creates fine)
  3. Create new branch hello/world/test - this errors with Invalid reference name.
  4. Create new branch foo/bar/test - this creates fine.
  5. Create new branch foo/bar - this errors with Invalid reference name.

Which Group/Project (with full path) is experiencing the issue?

Any group/project.

Approximate date/time when the error occurred.

11/04/2018 21:24 (reproduce-able everytime)