Merge "Better handling of duplicate remotes"