Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1291
diff -u -p -r1.1291 common.inc
--- includes/common.inc	19 Feb 2011 13:19:26 -0000	1.1291
+++ includes/common.inc	23 Feb 2011 11:31:42 -0000
@@ -2471,7 +2471,7 @@ function drupal_deliver_html_page($page_
 
         // Keep old path for reference, and to allow forms to redirect to it.
         if (!isset($_GET['destination'])) {
-          $_GET['destination'] = $_GET['q'];
+          drupal_get_destination();
         }
 
         $path = drupal_get_normal_path(variable_get('site_404', ''));
@@ -2500,7 +2500,7 @@ function drupal_deliver_html_page($page_
 
         // Keep old path for reference, and to allow forms to redirect to it.
         if (!isset($_GET['destination'])) {
-          $_GET['destination'] = $_GET['q'];
+          drupal_get_destination();
         }
 
         $path = drupal_get_normal_path(variable_get('site_403', ''));
