Fix a bug in link up/down handling discovered by STC

Change-Id: I8e1257b8ea3592b7695e5a5dded43286f5b29d3b
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Compiling.java b/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Compiling.java
index 1f5eb38..6743be9 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Compiling.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Compiling.java
@@ -60,7 +60,7 @@
             return Optional.of(new Installing(processor, new IntentData(data, compiled), stored));
         } catch (IntentException e) {
             log.debug("Unable to compile intent {} due to: {}", data.intent(), e);
-            if (stored.filter(x -> x.installables().isEmpty()).isPresent()) {
+            if (stored.filter(x -> !x.installables().isEmpty()).isPresent()) {
                 // removing orphaned flows and deallocating resources
                 return Optional.of(new Withdrawing(processor, new IntentData(data, stored.get().installables())));
             } else {