Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 6735)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 6736)
@@ -174,5 +174,5 @@
     public void apply(MultiCascade mc, OsmPrimitive osm, double scale, OsmPrimitive multipolyOuterWay, boolean pretendWayIsClosed) {
         Environment env = new Environment(osm, mc, null, this);
-        for (MapCSSRule r : rules) {
+        RULE: for (MapCSSRule r : rules) {
             for (Selector s : r.selectors) {
                 env.clearSelectorMatchingInformation();
@@ -200,4 +200,5 @@
                     env.layer = sub;
                     r.execute(env);
+                    continue RULE;
                 }
             }
Index: /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy	(revision 6735)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy	(revision 6736)
@@ -3,4 +3,5 @@
 import org.junit.Before
 import org.junit.Test
+import org.openstreetmap.TestUtils
 import org.openstreetmap.josm.Main
 import org.openstreetmap.josm.data.Preferences
@@ -181,3 +182,20 @@
         assert !c2.applies(new Environment().withPrimitive(w2))
     }
+
+    @Test
+    public void testTicket8568() throws Exception {
+        def sheet = new MapCSSStyleSource("")
+        getParser("" +
+                "way { width: 5; }\n" +
+                "way[keyA], way[keyB] { width: eval(prop(width)+10); }").sheet(sheet)
+        def mc = new MultiCascade()
+        sheet.apply(mc, TestUtils.createPrimitive("way foo=bar"), 20, null, false)
+        assert mc.getCascade(Environment.DEFAULT_LAYER).get("width") == 5
+        sheet.apply(mc, TestUtils.createPrimitive("way keyA=true"), 20, null, false)
+        assert mc.getCascade(Environment.DEFAULT_LAYER).get("width") == 15
+        sheet.apply(mc, TestUtils.createPrimitive("way keyB=true"), 20, null, false)
+        assert mc.getCascade(Environment.DEFAULT_LAYER).get("width") == 15
+        sheet.apply(mc, TestUtils.createPrimitive("way keyA=true keyB=true"), 20, null, false)
+        assert mc.getCascade(Environment.DEFAULT_LAYER).get("width") == 15
+    }
 }
