Avoid extracting resource set from backing range set

This is one of fixes for ONOS-4684

Change-Id: I6170d466f168f0b2299f96c623e5435c6631ba12
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/EncodableDiscreteResources.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/EncodableDiscreteResources.java
index 9918a28..fdfaf7c 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/EncodableDiscreteResources.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/EncodableDiscreteResources.java
@@ -104,7 +104,9 @@
 
     @Override
     public boolean containsAny(Set<DiscreteResource> other) {
-        return !Sets.intersection(this.values(), other).isEmpty();
+        return other.stream()
+                .filter(x -> !map.containsKey(x))
+                .anyMatch(x -> map.get(getClass(x)).contains(x));
     }
 
     @Override