Index: trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 9692)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 9693)
@@ -1425,5 +1425,5 @@
         }
 
-        protected abstract Collection<Bounds> getBounds();
+        protected abstract Collection<Bounds> getBounds(OsmPrimitive primitive);
 
         @Override
@@ -1432,5 +1432,5 @@
                 return false;
             else if (osm instanceof Node) {
-                Collection<Bounds> allBounds = getBounds();
+                Collection<Bounds> allBounds = getBounds(osm);
                 if (allBounds != null) {
                     LatLon coor = ((Node) osm).getCoor();
@@ -1467,7 +1467,6 @@
 
         @Override
-        protected Collection<Bounds> getBounds() {
-            return Main.main == null || Main.main.getCurrentDataSet() == null || Main.main.getCurrentDataSet().getDataSourceArea() == null
-                    ? null : Main.main.getCurrentDataSet().getDataSourceBounds();
+        protected Collection<Bounds> getBounds(OsmPrimitive primitive) {
+            return primitive.getDataSet() != null ? primitive.getDataSet().getDataSourceBounds() : null;
         }
 
@@ -1480,5 +1479,5 @@
     /**
      * Matches objects which are not outside the source area ("downloaded area").
-     * Unlink {@link InDataSourceArea} this matches also if no source area is set (e.g., for new layers).
+     * Unlike {@link InDataSourceArea} this matches also if no source area is set (e.g., for new layers).
      */
     public static class NotOutsideDataSourceArea extends InDataSourceArea {
@@ -1492,6 +1491,6 @@
 
         @Override
-        protected Collection<Bounds> getBounds() {
-            final Collection<Bounds> bounds = super.getBounds();
+        protected Collection<Bounds> getBounds(OsmPrimitive primitive) {
+            final Collection<Bounds> bounds = super.getBounds(primitive);
             return bounds == null || bounds.isEmpty() ? Collections.singleton(Main.getProjection().getWorldBoundsLatLon()) : bounds;
         }
@@ -1513,5 +1512,5 @@
 
         @Override
-        protected Collection<Bounds> getBounds() {
+        protected Collection<Bounds> getBounds(OsmPrimitive primitive) {
             if (!Main.isDisplayingMapView()) {
                 return null;
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedNode.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedNode.java	(revision 9692)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedNode.java	(revision 9693)
@@ -41,5 +41,5 @@
         if (n.isUsable() && !n.isTagged() && n.getReferrers().isEmpty()) {
 
-            if (!n.hasKeys() && !IN_DOWNLOADED_AREA.evaluate(n)) {
+            if (!n.hasKeys() && IN_DOWNLOADED_AREA.evaluate(n)) {
                 String msg = marktr("No tags");
                 errors.add(new TestError(this, Severity.WARNING, ERROR_MESSAGE, tr(msg), msg, UNTAGGED_NODE_BLANK, n));
