Test and fix find_inconsistent_replicas