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));
Index: /trunk/test/data/regress/12464/example.osm
===================================================================
--- /trunk/test/data/regress/12464/example.osm	(revision 9693)
+++ /trunk/test/data/regress/12464/example.osm	(revision 9693)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<osm version='0.6' upload='true' generator='JOSM'>
+  <node id='-30' action='modify' visible='true' lat='-22.36830614198' lon='-48.7442054335' />
+</osm>
Index: /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UntaggedNodeTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UntaggedNodeTest.java	(revision 9692)
+++ /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UntaggedNodeTest.java	(revision 9693)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.data.validation.tests;
 
+import static org.CustomMatchers.hasSize;
 import static org.CustomMatchers.isEmpty;
 import static org.junit.Assert.assertThat;
@@ -46,3 +47,19 @@
         }
     }
+
+    /**
+     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12464">Bug #12464</a>.
+     * @throws Exception if an error occurs
+     */
+    @Test
+    public void testTicket12464() throws Exception {
+        test.initialize();
+        test.startTest(null);
+        try (InputStream fis = TestUtils.getRegressionDataStream(12464, "example.osm")) {
+            final DataSet ds = OsmReader.parseDataSet(fis, NullProgressMonitor.INSTANCE);
+            test.visit(ds.allPrimitives());
+            test.endTest();
+            assertThat(test.getErrors(), hasSize(1));
+        }
+    }
 }
