in reply to tying tied hash scalars

I have an idea you might look into: perhaps the hash implementation behind the tied hash is returning ordinary scalar values rather than references to magic objects? For example, if your FETCH function returned a computed value, or something like 0+%internal{key}, then it would lose the magic from what you stored.