Index: lib/OpenLayers/Map.js
===================================================================
--- lib/OpenLayers/Map.js	(revision 9549)
+++ lib/OpenLayers/Map.js	(working copy)
@@ -1854,15 +1854,18 @@
      * {<OpenLayers.Bounds>} The maxExtent property as set on the current 
      *     baselayer, unless the 'restricted' option is set, in which case
      *     the 'restrictedExtent' option from the map is returned (if it
-     *     is set).
+     *     is set), or unless 'allOverlays' is true for the map, in which
+     *     case the maxExtent property of the map is returned.
      */
     getMaxExtent: function (options) {
         var maxExtent = null;
         if(options && options.restricted && this.restrictedExtent){
             maxExtent = this.restrictedExtent;
-        } else if (this.baseLayer != null) {
+        } else if (this.baseLayer != null && !this.allOverlays) {
             maxExtent = this.baseLayer.maxExtent;
-        }        
+        } else {
+            maxExtent = this.maxExtent;
+        }
         return maxExtent;
     },
     
