Index: trunk/src/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSource.java	(revision 8696)
+++ trunk/src/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSource.java	(revision 8697)
@@ -110,12 +110,11 @@
 
         for (int zoom = getMinZoom(); zoom <= getMaxZoom(); zoom++) {
+            // use well known scale set "GoogleCompatibile" from OGC WMTS spec to calculate number of tiles per zoom level
+            // this makes the zoom levels "glued" to standard TMS zoom levels
+            degreesPerTile[zoom] = (SCALE_DENOMINATOR_ZOOM_LEVEL_1 / Math.pow(2, zoom - 1)) * crsScale;
             TileXY maxTileIndex = latLonToTileXY(bottomRight.toCoordinate(), zoom);
             tileXMax[zoom] = maxTileIndex.getXIndex();
             tileYMax[zoom] = maxTileIndex.getYIndex();
-            // use well known scale set "GoogleCompatibile" from OGC WMTS spec to calculate number of tiles per zoom level
-            // this makes the zoom levels "glued" to standard TMS zoom levels
-            degreesPerTile[zoom] = (SCALE_DENOMINATOR_ZOOM_LEVEL_1 / Math.pow(2, zoom - 1)) * crsScale;
-        }
-
+        }
     }
 
