Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelperTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelperTest.java	(revision 15920)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelperTest.java	(revision 15921)
@@ -4,7 +4,12 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
 
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -17,5 +22,16 @@
 import org.junit.Rule;
 import org.junit.Test;
+import org.openstreetmap.josm.TestUtils;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmDataManager;
+import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.tagging.ac.AutoCompletionItem;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.dialogs.properties.TagEditHelper.AddTagsDialog;
+import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
+import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -66,3 +82,39 @@
         // TODO: complete test
     }
+
+    /**
+     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/18764>#18764</a>
+     *
+     * @throws InvocationTargetException Check logs -- if caused by NPE, a
+     *                                   regression probably occurred.
+     * @throws IllegalArgumentException  Check source code
+     * @throws IllegalAccessException    Check source code
+     * @throws NoSuchFieldException      Check source code
+     * @throws SecurityException         Probably shouldn't happen for tests
+     * @throws NoSuchMethodException     Check source code
+     */
+    @Test
+    public void testTicket18764() throws NoSuchMethodException, SecurityException, IllegalAccessException,
+            IllegalArgumentException, InvocationTargetException, NoSuchFieldException {
+        MapCSSStyleSource css = new MapCSSStyleSource(
+                "*[building] ⧉ *[highway] { text: tr(\"Building crossing highway\"); }");
+        css.loadStyleSource();
+        MapPaintStyles.addStyle(css);
+        DataSet ds = new DataSet();
+        // This does require a way
+        Way way = TestUtils.newWay("", new Node(LatLon.NORTH_POLE), new Node(LatLon.SOUTH_POLE));
+        way.getNodes().forEach(ds::addPrimitive);
+        ds.addPrimitive(way);
+        OsmDataManager.getInstance().setActiveDataSet(ds);
+        MainApplication.getLayerManager().addLayer(new OsmDataLayer(ds, "Test Layer", null));
+        TagEditHelper helper = newTagEditHelper();
+        Field sel = TagEditHelper.class.getDeclaredField("sel");
+        sel.set(helper, Collections.singletonList(way));
+        AddTagsDialog addTagsDialog = helper.getAddTagsDialog();
+        Method findIcon = TagEditHelper.AbstractTagsDialog.class.getDeclaredMethod("findIcon", String.class,
+                String.class);
+        findIcon.setAccessible(true);
+        Object val = findIcon.invoke(addTagsDialog, "highway", "");
+        assertNotNull(val);
+    }
 }
