Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 5168)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 5169)
@@ -1692,8 +1692,12 @@
     }
 
+    public boolean typeMatches(Collection<PresetType> t) {
+        return t == null || types == null || types.containsAll(t);
+    }
+
     public boolean matches(Collection<PresetType> t, Map<String, String> tags, boolean onlyShowable) {
         if (onlyShowable && !isShowable()) {
             return false;
-        } else if (t != null && types != null && !types.containsAll(t)) {
+        } else if (!typeMatches(t)) {
             return false;
         }
Index: /trunk/src/org/openstreetmap/josm/tools/TaggingPresetNameTemplateList.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/TaggingPresetNameTemplateList.java	(revision 5168)
+++ /trunk/src/org/openstreetmap/josm/tools/TaggingPresetNameTemplateList.java	(revision 5169)
@@ -2,5 +2,6 @@
 package org.openstreetmap.josm.tools;
 
-import java.util.EnumSet;
+import java.util.Collection;
+import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
@@ -39,6 +40,15 @@
 
         for (TaggingPreset t : presetsWithPattern) {
-            if (t.matches(EnumSet.of(PresetType.forPrimitive(primitive)), primitive.getKeys(), false)) {
-                return t;
+            Collection<PresetType> type = Collections.singleton(PresetType.forPrimitive(primitive));
+            if (t.typeMatches(type)) {
+                if (t.nameTemplateFilter != null) {
+                    if (t.nameTemplateFilter.match(primitive))
+                        return t;
+                    else {
+                        continue;
+                    }
+                } else if (t.matches(type, primitive.getKeys(), false)) {
+                    return t;
+                }
             }
         }
