Leadership: Rerun purge step when conflicting updates are detected

Change-Id: Iecf34a79688ff6d288f7bf17e0d99be35b6539e2
diff --git a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DistributedLeadershipManager.java b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DistributedLeadershipManager.java
index 2a69e19..8ee115a 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DistributedLeadershipManager.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DistributedLeadershipManager.java
@@ -577,6 +577,10 @@
                                                 updatedCandidates.value(),
                                                 updatedCandidates.version(),
                                                 updatedCandidates.creationTime())));
+                            } else {
+                                // Conflicting update detected. Rerun purge to make sure
+                                // inactive candidates are evicted.
+                                rerunPurge.set(true);
                             }
                         } catch (Exception e) {
                             log.debug("Failed to evict inactive candidates {} from "