[ONOS-7734] ct intent is stucked in WITHDRAWING state for ever after submitting intent withdraw request

Change-Id: I5ebbe2faf3eaad51398bdb07feb3b422a20f8af2
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2GroupHandler.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2GroupHandler.java
index 24a833d..396643e 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2GroupHandler.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2GroupHandler.java
@@ -1868,11 +1868,10 @@
 
     protected void processPendingRemoveNextObjs(GroupKey key) {
         pendingRemoveNextObjectives.asMap().forEach((nextObjective, groupKeys) -> {
+            groupKeys.remove(key);
             if (groupKeys.isEmpty()) {
                 pendingRemoveNextObjectives.invalidate(nextObjective);
                 pass(nextObjective);
-            } else {
-                groupKeys.remove(key);
             }
         });
     }