diff --git a/includes/command.inc b/includes/command.inc
index 39b2081..22aa41f 100644
--- a/includes/command.inc
+++ b/includes/command.inc
@@ -107,11 +107,11 @@ function drush_invoke_args($command, $args) {
     // Run all of the functions available for this variation
     foreach ($list as $commandfile => $filename) {
       $oldfunc = sprintf("drush_%s_%s", $commandfile, $var_hook);
-      $func = str_replace('drush_' . $commandfile . '_' . $commandfile, 'drush_' . $commandfile, $oldfunc);
+      $func = str_replace('drush_' . $commandfile . '_' . $commandfile . '_', 'drush_' . $commandfile . '_', $oldfunc);
       if (($oldfunc != $func) && (function_exists($oldfunc))) {
         drush_log(dt("The drush command hook naming conventions have changed; the function !oldfunc must be renamed to !func.", array('!oldfunc' => $oldfunc, '!func' => $func)), "error");
       }
-      if (function_exists($func)) {
+      if (function_exists($func) && !in_array($func, $functions)) {
         $functions[] = $func;
         $all_available_hooks[] = $func . ' [*]';
         $available_rollbacks[] = $func . '_rollback';
@@ -1269,4 +1269,4 @@ function drush_shell_alias_replace() {
     drush_parse_args();
     _drush_bootstrap_global_options();
   }
-}
\ No newline at end of file
+}
