Hah, actually it turned out to be that with RemoteBranches this method needs to replace self._real_branch.repository (if set) as well as self.repository. Proposing fix for review now.
Hah, actually it turned out to be that with RemoteBranches this method needs to replace self._real_ branch. repository (if set) as well as self.repository. Proposing fix for review now.