Index: modules/overlay/overlay-parent.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay-parent.js,v
retrieving revision 1.27
diff -u -r1.27 overlay-parent.js
--- modules/overlay/overlay-parent.js	20 Feb 2010 14:48:38 -0000	1.27
+++ modules/overlay/overlay-parent.js	24 Feb 2010 13:51:20 -0000
@@ -870,10 +870,16 @@
     // There may have been a redirect inside the child overlay window that the
     // parent wasn't aware of. Update the parent URL fragment appropriately.
     var newLocation = Drupal.overlay.fragmentizeLink(childLocation);
+    // Remove "render=overlay" from the (encoded) querystring of the
+    // child location.
+    newLocation.replace(/(%3F|%26)render%3Doverlay/, '');
     // Set a 'redirect' flag on the new location so the hashchange event handler
     // knows not to change the overlay's content.
-    $.data(window.location, newLocation, 'redirect');
-    window.location.href = newLocation;
+    $.data(window.location, newLocation, 'redirect');    
+    // location.replace doesn't create a history entry. location.href does.
+    // In this case, we want location.replace, as we're creating the history
+    // entry using URL fragments.
+    window.location.replace(newLocation);
   }
 };
 
