I finally managed to figure out a way of recovering your pet if it died because some lousy mod-maker forgot to set his custom pet to "Invincible = TRUE".
This works with Alchemists only AFAIK, but if you have some sort of permanant pet as a Vanq or Destro, then it will work for you too.
What has happened:
Using aforesaid lousy mod-makers work, your pet got killed, the pet window is MIA, and nothing you do (reloading, TP-ing etc) can bring your pet back.
0. MAKE SURE YOU HAVE NO PETS/SUMMONS ACTIVE BEFORE YOU START
1. Summon a perma-pet (Alchemical golem comes to mind)
2. Buy a Dog/Catfish
3. Use Dog/Catfish.
This allows you to open your stash again, and your pet has regained its inventory. Also, I've tested this with death and pet-damage. The Cat/Dog flees as normal, and will be around when you respawn after dying. The only problem I've found so far is that your pet is going to be named "Alchemical Golem.
Hope this helps some of you that I've screwed over