fixes new branch button positioning, when visible and not visible container
Fixes #5893 (closed) #5893 (closed) was not completely fixed. If a new branch was pushed the container is in correct position but if no container existed the position was incorrect. This MR fixes that.