Index: /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 8814)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 8815)
@@ -166,5 +166,4 @@
 
         try {
-            if (!tile.isLoaded()) { //if someone else already loaded tile, skip all the handling
                 tile.finishLoading(); // whatever happened set that loading has finished
                 // set tile metadata
@@ -178,14 +177,4 @@
                 case SUCCESS:
                     handleNoTileAtZoom();
-                    if (object != null) {
-                        byte[] content = object.getContent();
-                        if (content != null && content.length > 0) {
-                            tile.loadImage(new ByteArrayInputStream(content));
-                            if (tile.getImage() == null) {
-                                tile.setError(tr("Could not load image from tile server"));
-                                status = false;
-                            }
-                        }
-                    }
                     int httpStatusCode = attributes.getResponseCode();
                     if (!isNoTileAtZoom() && httpStatusCode >= 400) {
@@ -197,8 +186,9 @@
                         status = false;
                     }
+                    status &= tryLoadTileImage(object); //try to keep returned image as background
                     break;
                 case FAILURE:
                     tile.setError("Problem loading tile");
-                    // no break intentional here
+                    tryLoadTileImage(object);
                     break;
                 case CANCELED:
@@ -206,5 +196,4 @@
                     // do nothing
                 }
-            }
 
             // always check, if there is some listener interested in fact, that tile has finished loading
@@ -327,4 +316,16 @@
     }
 
-
+    private boolean tryLoadTileImage(CacheEntry object) throws IOException {
+        if (object != null) {
+            byte[] content = object.getContent();
+            if (content != null && content.length > 0) {
+                tile.loadImage(new ByteArrayInputStream(content));
+                if (tile.getImage() == null) {
+                    tile.setError(tr("Could not load image from tile server"));
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
 }
