Work around a branch-manager issue, prevent a similar one

Close #1162.