Are you using bots as well or not?
If you are I'd guess this is the problem in NPC::Death()
Code:
#ifdef BOTS
if(!ownerInGroup) {
give_exp = NULL;
}
#endif //BOTS
I didn't debug it, but I assume that if the pet is the top damage on the hate list that it clears who to give experience to if they are not in a group. There's needs to be more checking to make sure it's actually a bot that was top damage and not a client's pet.