Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 17100)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 17101)
@@ -3,7 +3,9 @@
 
 import java.util.Arrays;
+import java.util.Map;
 import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Function;
 
-import org.openstreetmap.josm.data.osm.Storage;
 import org.openstreetmap.josm.tools.Pair;
 
@@ -16,5 +18,5 @@
 
     // TODO: clean up the intern pool from time to time (after purge or layer removal)
-    private static final Storage<StyleCache> internPool = new Storage<>();
+    private static final Map<StyleCache, StyleCache> internPool = new ConcurrentHashMap<>();
 
     /**
@@ -98,5 +100,5 @@
      */
     private StyleCache intern() {
-        return internPool.putUnique(this);
+        return internPool.computeIfAbsent(this, Function.identity());
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 17100)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 17101)
@@ -653,13 +653,12 @@
         public boolean matches(Environment env) {
             CheckParameterUtil.ensureParameterNotNull(env, "env");
-            for (Condition c : conds) {
+            return conds.stream().allMatch(c -> {
                 try {
-                    if (!c.applies(env)) return false;
+                    return c.applies(env);
                 } catch (PatternSyntaxException e) {
                     Logging.log(Logging.LEVEL_ERROR, "PatternSyntaxException while applying condition" + c + ':', e);
                     return false;
                 }
-            }
-            return true;
+            });
         }
 
