Avoiding problems with exporttree remotes in some unusual circumstances. This commit was sponsored by Brett Eisenberg on Patreon.
This will allow Annex.Branch to use it, in transitions code. This commit was sponsored by Luke Shumaker on Patreon.