Why is hook_menu_local_tasks_alter called twice? For some reason, Drupal is calling hook_menu_local_tasks_alter twice. This results in either a) doubled tabs or b) really annoying code trying to determine if my custom tabs have already been added.

Can someone help me figure out what's going on here? Why would it be called twice? I'm using PathAuto, is this maybe a redirect issue?
If you are familiar with the command line, you can use the following command to return file names and line numbers where this hook is being called.

For example, change directories into your /sites/all/modules directory or other module directory and run,

(assuming your are using mac or linux)

$grep "menu_local_tasks" * -rn


or as Clive has it below.

$grep "drupal_alter(\'menu_local_tasks\'" * -rn


*Note, the backslashes escape the single quotes.

Jason.