Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java	(revision 16376)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java	(revision 16377)
@@ -10,5 +10,4 @@
 import java.util.Set;
 
-import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.OsmUtils;
 import org.openstreetmap.josm.data.osm.Relation;
@@ -143,5 +142,5 @@
 
         new UnclosedWaysCheck(1102, "landuse", marktr("landuse type {0}")),
-        new UnclosedWaysCheck(1103, "amenities", marktr("amenities type {0}")),
+        new UnclosedWaysCheck(1103, "amenity", marktr("amenity type {0}")),
         new UnclosedWaysCheck(1104, "sport",     marktr("sport type {0}"),
                 new HashSet<>(Arrays.asList("water_slide", "climbing", "skiing", "toboggan", "bobsleigh", "karting"))),
@@ -180,10 +179,7 @@
             return;
 
-        for (OsmPrimitive parent: w.getReferrers()) {
-            if (parent instanceof Relation && ((Relation) parent).isMultipolygon())
+        for (UnclosedWaysCheck c : checks) {
+            if ("boundary".equals(c.key) && w.referrers(Relation.class).anyMatch(Relation::isMultipolygon))
                 return;
-        }
-
-        for (UnclosedWaysCheck c : checks) {
             TestError error = c.getTestError(w, this);
             if (error != null) {
Index: /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnclosedWaysTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnclosedWaysTest.java	(revision 16376)
+++ /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnclosedWaysTest.java	(revision 16377)
@@ -79,5 +79,6 @@
 
     /**
-     * Test to make sure the multipolygon ways are ignored
+     * Test to make sure the multipolygon ways are not ignored
+     * See #19136, #19145
      * @throws Exception if an exception occurs
      */
@@ -96,4 +97,28 @@
         uwTest.visit(w);
         assertTrue(ElemStyles.hasAreaElemStyle(w, false));
+        assertEquals(1, uwTest.getErrors().size());
+
+        uwTest.endTest();
+    }
+
+    /**
+     * Test to make sure the boundary ways are ignored when member of a boundary relation
+     * See #19136, #19145
+     * @throws Exception if an exception occurs
+     */
+    @Test
+    public void testWayInBoundary() throws Exception {
+        UnclosedWays uwTest = new UnclosedWays();
+        uwTest.initialize();
+        uwTest.startTest(null);
+        DataSet ds = new DataSet();
+
+        // Erroneous tag
+        Way w = createUnclosedWay("boundary=administrative", ds);
+        Relation r = (Relation) OsmUtils.createPrimitive("relation type=boundary");
+        r.addMember(new RelationMember("inner", w));
+        ds.addPrimitive(r);
+        uwTest.visit(w);
+        assertFalse(ElemStyles.hasAreaElemStyle(w, false));
         assertEquals(0, uwTest.getErrors().size());
 
@@ -101,3 +126,25 @@
     }
 
+    /**
+     * Test to make sure that amenity=* is closed.
+     * See #19145
+     * @throws Exception if an exception occurs
+     */
+    @Test
+    public void testAmenity() throws Exception {
+        UnclosedWays uwTest = new UnclosedWays();
+        uwTest.initialize();
+        uwTest.startTest(null);
+        DataSet ds = new DataSet();
+
+        // Erroneous tag
+        Way w = createUnclosedWay("amenity=school", ds);
+        uwTest.visit(w);
+        assertTrue(ElemStyles.hasAreaElemStyle(w, false));
+        assertEquals(1, uwTest.getErrors().size());
+        assertEquals(1103, uwTest.getErrors().iterator().next().getCode());
+
+        uwTest.endTest();
+    }
+
  }
