I think update_references needs to be called before the branch on tag_revision or it will break checking remote refs.