in reply to Berkeley DB Funkiness
I seriously suspect that the problem is with $tieHASH, actually that caller(), as there is no guarantee that caller() will return the call frames you want. The frames could be gone, before caller() can catch them.
I suggest you to dump out $tieHASH.