Index: /applications/editors/josm/plugins/osmarender/src/OsmarenderPlugin.java
===================================================================
--- /applications/editors/josm/plugins/osmarender/src/OsmarenderPlugin.java	(revision 15937)
+++ /applications/editors/josm/plugins/osmarender/src/OsmarenderPlugin.java	(revision 15938)
@@ -65,5 +65,8 @@
             for (OsmPrimitive p : new HashSet<OsmPrimitive>(backRefsV.data)) {
                 if (p instanceof Way) {
-                    backRefsV.data.addAll(((Way) p).nodes);
+                    for (Node n : ((Way) p).nodes) {
+                        if (n.coor.isWithin(b))
+                            backRefsV.data.add(n);
+                    }
                 }
             }
@@ -79,4 +82,5 @@
                 w.writeContent(fromDataSet);
                 w.footer();
+                w.close();
 
                 // get the exec line
