Index: modules/overlay/overlay-parent.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay-parent.js,v
retrieving revision 1.22
diff -u -r1.22 overlay-parent.js
--- modules/overlay/overlay-parent.js	14 Jan 2010 04:06:54 -0000	1.22
+++ modules/overlay/overlay-parent.js	15 Jan 2010 19:38:43 -0000
@@ -925,7 +925,7 @@
   if (path.charAt(0) != '/') {
     path = '/' + path;
   }
-  path = path.replace(new RegExp(Drupal.settings.basePath), '');
+  path = path.replace(new RegExp(Drupal.settings.basePath + "(index.php)?"), '');
   if (path == '' && !ignorePathFromQueryString) {
     // If the path appears empty, it might mean the path is represented in the
     // query string (clean URLs are not used).
