Fix using _branches in remote_branches property.

All checks for local branches after a remote branch was accessed was
failing.

Add test so this stupid problem doesn't repeat anymore.