Index: trunk/src/org/openstreetmap/josm/data/validation/TestError.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/TestError.java	(revision 17621)
+++ trunk/src/org/openstreetmap/josm/data/validation/TestError.java	(revision 17622)
@@ -540,4 +540,33 @@
     }
 
+    /**
+     * Tests if two errors are similar, i.e.,
+     * same code and description and same combination of primitives and same combination of highlighted objects, but maybe with different orders.
+     * @param other the other error to be compared
+     * @return true if two errors are similar
+     */
+    public boolean isSimilar(TestError other) {
+        return getCode() == other.getCode()
+                && getMessage().equals(other.getMessage())
+                && getPrimitives().size() == other.getPrimitives().size()
+                && getPrimitives().containsAll(other.getPrimitives())
+                && highlightedIsEqual(getHighlighted(), other.getHighlighted());
+    }
+
+    private static boolean highlightedIsEqual(Collection<?> highlighted, Collection<?> highlighted2) {
+        if (highlighted.size() == highlighted2.size()) {
+            if (!highlighted.isEmpty()) {
+                Object h1 = highlighted.iterator().next();
+                Object h2 = highlighted2.iterator().next();
+                if (h1 instanceof Area && h2 instanceof Area) {
+                    return ((Area) h1).equals((Area) h2);
+                }
+                return highlighted.containsAll(highlighted2);
+            }
+            return true;
+        }
+        return false;
+    }
+
     @Override
     public String toString() {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 17621)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 17622)
@@ -202,27 +202,7 @@
      */
     private static void addIfNotSimilar(TestError toAdd, List<TestError> errors) {
-        final boolean isDup = toAdd.getPrimitives().size() >= 2 && errors.stream()
-                .anyMatch(e -> e.getCode() == toAdd.getCode()
-                        && e.getMessage().equals(toAdd.getMessage())
-                        && e.getPrimitives().size() == toAdd.getPrimitives().size()
-                        && e.getPrimitives().containsAll(toAdd.getPrimitives())
-                        && highlightedIsEqual(e.getHighlighted(), toAdd.getHighlighted()));
+        final boolean isDup = toAdd.getPrimitives().size() >= 2 && errors.stream().anyMatch(toAdd::isSimilar);
         if (!isDup)
             errors.add(toAdd);
-    }
-
-    private static boolean highlightedIsEqual(Collection<?> highlighted, Collection<?> highlighted2) {
-        if (highlighted.size() == highlighted2.size()) {
-            if (!highlighted.isEmpty()) {
-                Object h1 = highlighted.iterator().next();
-                Object h2 = highlighted2.iterator().next();
-                if (h1 instanceof Area && h2 instanceof Area) {
-                    return ((Area) h1).equals((Area) h2);
-                }
-                return highlighted.containsAll(highlighted2);
-            }
-            return true;
-        }
-        return false;
     }
 
