Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy	(revision 6677)
+++ 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
+    }
 }
