I note from reading _mongoc_cluster_reconnect_replica_set and _mongoc_cluster_ismaster that if the first seed in this URI:
"mongodb://host1,host2/?replicaSet=rs"
... has a different replicaSet name from the one specified in the URI, libmongoc logs an "INFO"-level message but trusts the host anyway. In fact, the host might not even be a replica set member; the driver considers it primary even if it has no "secondary" field and no "setName".
Already fixed in the 1.2 branch and verified by the Server Discovery And Monitoring YAML tests.