Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 7067)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 7069)
@@ -37,4 +37,5 @@
 import org.openstreetmap.josm.gui.mappaint.mapcss.Instruction;
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSRule;
+import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSRule.Declaration;
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector;
@@ -47,4 +48,5 @@
 import org.openstreetmap.josm.io.UTFInputStreamReader;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
+import org.openstreetmap.josm.tools.MultiMap;
 import org.openstreetmap.josm.tools.Predicate;
 import org.openstreetmap.josm.tools.Utils;
@@ -56,4 +58,13 @@
 public class MapCSSTagChecker extends Test.TagTest {
 
+    public static class GroupedMapCSSRule {
+        final public List<Selector> selectors;
+        final public Declaration declaration;
+
+        public GroupedMapCSSRule(List<Selector> selectors, Declaration declaration) {
+            this.selectors = selectors;
+            this.declaration = declaration;
+        }
+    }
     /**
      * The preference key for tag checker source entries.
@@ -72,5 +83,5 @@
 
     static class TagCheck implements Predicate<OsmPrimitive> {
-        protected final MapCSSRule rule;
+        protected final GroupedMapCSSRule rule;
         protected final List<PrimitiveToTag> change = new ArrayList<>();
         protected final Map<String, String> keyChange = new LinkedHashMap<>();
@@ -79,5 +90,5 @@
         protected final Map<String, Boolean> assertions = new HashMap<>();
 
-        TagCheck(MapCSSRule rule) {
+        TagCheck(GroupedMapCSSRule rule) {
             this.rule = rule;
         }
@@ -120,5 +131,5 @@
         }
 
-        static TagCheck ofMapCSSRule(final MapCSSRule rule) {
+        static TagCheck ofMapCSSRule(final GroupedMapCSSRule rule) {
             final TagCheck check = new TagCheck(rule);
             boolean containsSetClassExpression = false;
@@ -161,7 +172,7 @@
             }
             if (check.errors.isEmpty() && !containsSetClassExpression) {
-                throw new RuntimeException("No throwError/throwWarning/throwOther given! You should specify a validation error message for " + rule.selector);
+                throw new RuntimeException("No throwError/throwWarning/throwOther given! You should specify a validation error message for " + rule.selectors);
             } else if (check.errors.size() > 1) {
-                throw new RuntimeException("More than one throwError/throwWarning/throwOther given! You should specify a single validation error message for " + rule.selector);
+                throw new RuntimeException("More than one throwError/throwWarning/throwOther given! You should specify a single validation error message for " + rule.selectors);
             }
             return check;
@@ -180,10 +191,21 @@
             // Ignore "meta" rule(s) from external rules of JOSM wiki
             removeMetaRules(source);
-            return new ArrayList<>(Utils.transform(source.rules, new Utils.Function<MapCSSRule, TagCheck>() {
-                @Override
-                public TagCheck apply(MapCSSRule x) {
-                    return TagCheck.ofMapCSSRule(x);
-                }
-            }));
+            // group rules with common declaration block
+            MultiMap<MapCSSRule.Declaration, MapCSSRule> rules = new MultiMap<>();
+            for (MapCSSRule rule : source.rules) {
+                rules.put(rule.declaration, rule);
+            }
+            List<TagCheck> result = new ArrayList<>();
+            for (Collection<MapCSSRule> rulesCommonDecl : rules.values()) {
+                List<Selector> selectors = new ArrayList<>();
+                for (MapCSSRule rule : rulesCommonDecl) {
+                    selectors.add(rule.selector);
+                }
+                if (!rulesCommonDecl.isEmpty()) {
+                    result.add(TagCheck.ofMapCSSRule(
+                            new GroupedMapCSSRule(selectors, rulesCommonDecl.iterator().next().declaration)));
+                }
+            }
+            return result;
         }
 
@@ -211,7 +233,9 @@
 
         Selector whichSelectorMatchesEnvironment(Environment env) {
-            env.clearSelectorMatchingInformation();
-            if (rule.selector.matches(env)) {
-                return rule.selector;
+            for (Selector i : rule.selectors) {
+                env.clearSelectorMatchingInformation();
+                if (i.matches(env)) {
+                    return i;
+                }
             }
             return null;
@@ -384,7 +408,7 @@
 
     static class MapCSSTagCheckerAndRule extends MapCSSTagChecker {
-        public final MapCSSRule rule;
-
-        MapCSSTagCheckerAndRule(MapCSSRule rule) {
+        public final GroupedMapCSSRule rule;
+
+        MapCSSTagCheckerAndRule(GroupedMapCSSRule rule) {
             this.rule = rule;
         }
@@ -394,5 +418,5 @@
             return super.equals(obj)
                     || (obj instanceof TagCheck && rule.equals(((TagCheck) obj).rule))
-                    || (obj instanceof MapCSSRule && rule.equals(obj));
+                    || (obj instanceof GroupedMapCSSRule && rule.equals(obj));
         }
     }
@@ -410,5 +434,5 @@
             final Selector selector = check.whichSelectorMatchesEnvironment(env);
             if (selector != null) {
-                check.rule.execute(env);
+                check.rule.declaration.execute(env);
                 final TestError error = check.getErrorForPrimitive(p, selector, env);
                 if (error != null) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/Range.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/Range.java	(revision 7067)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/Range.java	(revision 7069)
@@ -8,6 +8,6 @@
  */
 public class Range {
-    private double lower;
-    private double upper;
+    private final double lower;
+    private final double upper;
 
     public static final Range ZERO_TO_INFINITY = new Range(0.0, Double.POSITIVE_INFINITY);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 7067)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 7069)
@@ -173,4 +173,10 @@
             return new Tag(k, v);
         }
+
+        @Override
+        public String toString() {
+            return '[' + k + '=' + v + ']';
+        }
+        
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java	(revision 7067)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java	(revision 7069)
@@ -11,7 +11,7 @@
 import org.openstreetmap.josm.gui.mappaint.StyleKeys;
 
-public abstract class Instruction implements StyleKeys {
+public interface Instruction extends StyleKeys {
 
-    public abstract void execute(Environment env);
+    void execute(Environment env);
 
     public static class RelativeFloat {
@@ -28,5 +28,5 @@
     }
 
-    public static class AssignmentInstruction extends Instruction {
+    public static class AssignmentInstruction implements Instruction {
         public final String key;
         public final Object val;
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java	(revision 7067)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java	(revision 7069)
@@ -21,4 +21,15 @@
             this.idx = idx;
         }
+        
+        /**
+         * <p>Executes the instructions against the environment {@code env}</p>
+         *
+         * @param env the environment
+         */
+        public void execute(Environment env) {
+            for (Instruction i : instructions) {
+                i.execute(env);
+            }
+        }
     }
     
@@ -34,7 +45,5 @@
      */
     public void execute(Environment env) {
-        for (Instruction i : declaration.instructions) {
-            i.execute(env);
-        }
+        declaration.execute(env);
     }
 
