Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MapImage.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MapImage.java	(revision 6373)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MapImage.java	(revision 6374)
@@ -19,4 +19,7 @@
 
 public class MapImage {
+    
+    private static final int MAX_SIZE = 48;
+    
     /**
      * ImageIcon can change while the image is loading.
@@ -117,4 +120,7 @@
         private Rectangle box() {
             int w = getWidth(), h = getHeight();
+            if (mustRescale(getImage())) {
+                w = h = 16;
+            }
             return new Rectangle(-w/2, -h/2, w, h);
         }
@@ -158,13 +164,16 @@
      */
     public Image getDisplayedNodeIcon(boolean disabled) {
-        final int maxSize = 48;
         final Image image = disabled ? getDisabled() : getImage();
         // Scale down large (.svg) images to 16x16 pixels if no size is explicitely specified
-        if ((width  == -1 && image.getWidth(null) > maxSize) 
-         && (height == -1 && image.getHeight(null) > maxSize)) {
+        if (mustRescale(image)) {
             return ImageProvider.createBoundedImage(image, 16);
         } else {
             return image;
         }
+    }
+    
+    private boolean mustRescale(Image image) {
+        return ((width  == -1 && image.getWidth(null) > MAX_SIZE) 
+             && (height == -1 && image.getHeight(null) > MAX_SIZE));
     }
 
