Index: src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 15058)
+++ src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(working copy)
@@ -605,6 +605,12 @@
                 } else if ("value".equals(type)) {
                     return tag.getValue();
                 } else if ("tag".equals(type)) {
+                    // see #17684
+                    if (p != null) {
+                        String val = p.get(tag.getKey());
+                        if (val != null)
+                            return new Tag(tag.getKey(), val).toString();
+                    }
                     return tag.toString();
                 }
             } catch (IndexOutOfBoundsException ignore) {
