Index: trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 8857)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 8859)
@@ -1163,5 +1163,5 @@
         @Override
         public boolean match(OsmPrimitive osm) {
-            return Main.main.getCurrentDataSet().isSelected(osm);
+            return osm.getDataSet().isSelected(osm);
         }
 
