Had the same problem with Pegasus and Thunderbird both configured that MercuryI only supports trays (not like directories on filessytsem capable holding directories and files: folders holding mails and subfolders). Created them with Pegasus and all seemed good. closed Pegasus and opened Thunderbird. All seemed good too. Next day opened Pegasus @work and all trays have been at root.
OK ... tried deleting the trays - which resulted in editing HIERARCH.PM by hand .
Created a hierarchie of trays and folders some days later and it seems to be stable. May be your moving of trays resulted in same stability (didn't try that, so don't know if it had worked in my case)?!
May be it is an initial problem on new IMAP-Mailboxes or first time creating a tray with subtrays? Just my suggestions ...
bye Olaf