Just a thought... Could you perhaps check the integrity of the private messages table?

Otherwise, the only time I see this sort of error is when I typed the code wrongly. sick