Thank you Nick. Somehow my email folders exhibited both problems discussed on this thread - always the same message body being displayed despite different headers shown, and "message not found". I have no idea why this started to happen, though I note that I have kept the same email structure for 12 years across at least 4 computers and on changing computers exported from the old and imported to the new. I noticed along the way that the "Storage Folder" / "Imported Folder" depth increased, and it was always a nuisance to have to shuffle things around afterwards to get the individual folders back to the first level under Storage Folders. Yet a closer look seemed to indicate that although on the surface it seemed that the shuffling had achieved what I wanted, nonetheless the deep structure seemed to survive somehow.
I have a suspicion that the problem may have started because of shortage of "disk" space. About 8 months ago I moved to a mini netbook with just 32gb solid state drive. I have had capacity limit warnings, so maybe that's the cause. Not that any software should get its database structure corrupted and just carry on as if nothing had happened.
Anyway, I followed your approach and it works well. Only took 3 hours!!