Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 15999)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 16000)
@@ -267,5 +267,9 @@
                 MapCSSRule r = rules.get(ruleIndex);
                 for (Selector selector : r.selectors) {
-                    final List<Condition> conditions = selector.getConditions();
+                    Selector selRightmost = selector;
+                    while (selRightmost instanceof Selector.ChildOrParentSelector) {
+                        selRightmost = ((Selector.ChildOrParentSelector) selRightmost).right;
+                    }
+                    final List<Condition> conditions = selRightmost.getConditions();
                     if (conditions == null || conditions.isEmpty()) {
                         remaining.set(ruleIndex);
