How to reorder vertical tabs by weight in Drupal 7? I have some vertical tabs I am trying to reorder and the dpm()'d weights are not matching the visual output. Can someone explain this or point me to the right documentation on how weights and vertical tabs work?
If you are calling the hook function through your module it can happen that other modules are calling the same hook function after your hook. This would make the changes you made overwritten by the other module.

So if you want to make sure your hook is called last, either call the function in the themes template.php file or change the weight of your module to something higher so that it gets executed last. The second option would require you to edit the system table in the database.