Index: includes/common.inc
===================================================================
--- includes/common.inc	(revision 97)
+++ includes/common.inc	(working copy)
@@ -389,6 +389,10 @@
     drupal_set_title(t('Access denied'));
     $return = t('You are not authorized to access this page.');
   }
+  // Keep old path for reference
+  if (!isset($_REQUEST['destination'])) {
+    $_REQUEST['destination'] = $_REQUEST['q'];
+  }
   print theme('page', $return);
 }