Do not invalidate the cache again if the dequeue is triggered by the cache timeout

Change-Id: Ie5a043f39a673004d5b29021a854fb4eeef0075a
diff --git a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/InOrderFlowObjectiveManager.java b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/InOrderFlowObjectiveManager.java
index 7ded0f5..4f70745 100644
--- a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/InOrderFlowObjectiveManager.java
+++ b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/InOrderFlowObjectiveManager.java
@@ -319,13 +319,17 @@
 
         if (obj instanceof FilteringObjective) {
             FilteringObjQueueKey k = new FilteringObjQueueKey(deviceId, priority, ((FilteringObjective) obj).key());
-            filtObjQueueHead.invalidate(k);
+            if (!ObjectiveError.INSTALLATIONTIMEOUT.equals(error)) {
+                filtObjQueueHead.invalidate(k);
+            }
             filtObjQueue.remove(k, obj);
             remaining = filtObjQueue.get(k);
         } else if (obj instanceof ForwardingObjective) {
             ForwardingObjQueueKey k =
                     new ForwardingObjQueueKey(deviceId, priority, ((ForwardingObjective) obj).selector());
-            fwdObjQueueHead.invalidate(k);
+            if (!ObjectiveError.INSTALLATIONTIMEOUT.equals(error)) {
+                fwdObjQueueHead.invalidate(k);
+            }
             fwdObjQueue.remove(k, obj);
             remaining = fwdObjQueue.get(k);
         } else if (obj instanceof NextObjective) {
@@ -346,7 +350,9 @@
                 }
             }
             NextObjQueueKey k = new NextObjQueueKey(deviceId, obj.id());
-            nextObjQueueHead.invalidate(k);
+            if (!ObjectiveError.INSTALLATIONTIMEOUT.equals(error)) {
+                nextObjQueueHead.invalidate(k);
+            }
             nextObjQueue.remove(k, obj);
             remaining = nextObjQueue.get(k);
         } else {