[Developer] Fix parsing of remote git version with similar branch names.