Index: panels_mini/panels_mini.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/panels_mini/Attic/panels_mini.module,v
retrieving revision 1.1.2.29
diff -u -r1.1.2.29 panels_mini.module
--- panels_mini/panels_mini.module	5 Jun 2008 03:46:22 -0000	1.1.2.29
+++ panels_mini/panels_mini.module	5 Jun 2008 06:27:47 -0000
@@ -41,6 +41,7 @@
  * Implementation of hook_menu().
  */
 function panels_mini_menu($may_cache) {
+  $items = array();
   if ($may_cache) {
     $access = user_access('create mini panels');
 
@@ -96,10 +97,12 @@
     );
   }
   else {
-    if (arg(0) == 'admin' && arg(1) == 'panels' && arg(2) == 'panel-mini') {
+    // Call panels_mini_menu_items only if the current page starts with 
+    // 'admin/panels/panel-mini/' and is not already registered with the menu.
+    // The latter rules out paths defined above in the $may_cache section. 
+    if (strpos($_GET['q'], 'admin/panels/panel-mini/') == 0 && !isset($GLOBALS['_menu']['path index'][$_GET['q']])) {
       $mini = panels_mini_load(arg(3));
       if ($mini && empty($mini->disabled)) {
-        $items = array();
         panels_mini_menu_items($items, "admin/panels/panel-mini/$mini->name", $mini);
       }
     }
