Index: includes/path.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/path.inc,v
retrieving revision 1.71
diff -u -p -r1.71 path.inc
--- includes/path.inc	9 Aug 2010 00:13:06 -0000	1.71
+++ includes/path.inc	24 Aug 2010 13:41:42 -0000
@@ -15,9 +15,13 @@
  */
 function drupal_path_initialize() {
   if (!empty($_GET['q'])) {
+    // Backup the original query parameter 'q' to allow modules to work with it.
+    $_GET['__q'] = $_GET['q'];
+    // Resolve the query parameter 'q' to a system path and replace it.
     $_GET['q'] = drupal_get_normal_path($_GET['q']);
   }
   else {
+    $_GET['__q'] = '';
     $_GET['q'] = drupal_get_normal_path(variable_get('site_frontpage', 'node'));
   }
 }
