It also does not break on racial hide, and it should. I can share the changes I made on my server if you guys want it.
This is around line 7100 on my source, but I date back to February or so.
client_packet.cpp
Code:
7104 + if ((this->GetPetType() == petCharmed) && hidden)
7105 + {
7106 + Mob* formerpet = this->GetPet();
7107 +
7108 + if(formerpet)
7109 + formerpet->BuffFadeByEffect(SE_Charm);
7110 + }
7111 +