Index: /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 12665)
+++ /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 12666)
@@ -99,5 +99,5 @@
 
             @Override
-            public Match get(String keyword, PushbackTokenizer tokenizer) throws SearchParseError {
+            public Match get(String keyword, boolean caseSensitive, boolean regexSearch, PushbackTokenizer tokenizer) throws SearchParseError {
                 switch(keyword) {
                 case "inview":
Index: /trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java	(revision 12665)
+++ /trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java	(revision 12666)
@@ -84,16 +84,13 @@
     private static Map<String, BinaryMatchFactory> binaryMatchFactoryMap = new HashMap<>();
 
+    static {
+        addMatchFactory(new CoreSimpleMatchFactory());
+        addMatchFactory(new CoreUnaryMatchFactory());
+    }
+
     public SearchCompiler(boolean caseSensitive, boolean regexSearch, PushbackTokenizer tokenizer) {
         this.caseSensitive = caseSensitive;
         this.regexSearch = regexSearch;
         this.tokenizer = tokenizer;
-
-        // register core match factories at first instance, so plugins should never be able to generate a NPE
-        if (simpleMatchFactoryMap.isEmpty()) {
-            addMatchFactory(new CoreSimpleMatchFactory());
-        }
-        if (unaryMatchFactoryMap.isEmpty()) {
-            addMatchFactory(new CoreUnaryMatchFactory());
-        }
     }
 
@@ -119,5 +116,5 @@
     }
 
-    public class CoreSimpleMatchFactory implements SimpleMatchFactory {
+    public static class CoreSimpleMatchFactory implements SimpleMatchFactory {
         private final Collection<String> keywords = Arrays.asList("id", "version", "type", "user", "role",
                 "changeset", "nodes", "ways", "tags", "areasize", "waylength", "modified", "deleted", "selected",
@@ -126,5 +123,5 @@
 
         @Override
-        public Match get(String keyword, PushbackTokenizer tokenizer) throws SearchParseError {
+        public Match get(String keyword, boolean caseSensitive, boolean regexSearch, PushbackTokenizer tokenizer) throws SearchParseError {
             switch(keyword) {
             case "modified":
@@ -248,5 +245,5 @@
 
     public interface SimpleMatchFactory extends MatchFactory {
-        Match get(String keyword, PushbackTokenizer tokenizer) throws SearchParseError;
+        Match get(String keyword, boolean caseSensitive, boolean regexSearch, PushbackTokenizer tokenizer) throws SearchParseError;
     }
 
@@ -1759,5 +1756,5 @@
                 SimpleMatchFactory factory = simpleMatchFactoryMap.get(key);
                 if (factory != null)
-                    return factory.get(key, tokenizer);
+                    return factory.get(key, caseSensitive, regexSearch, tokenizer);
 
                 UnaryMatchFactory unaryFactory = unaryMatchFactoryMap.get(key);
@@ -1773,5 +1770,5 @@
                 SimpleMatchFactory factory = simpleMatchFactoryMap.get(key);
                 if (factory != null)
-                    return factory.get(key, null);
+                    return factory.get(key, caseSensitive, regexSearch, null);
 
                 UnaryMatchFactory unaryFactory = unaryMatchFactoryMap.get(key);
