
I have attached the storage.js which contains the stored session.
Looking more closely at the 3rd and 4th attempt differences, you can see that the tree with "Browser Extensions - ... (3)" and tree "firefox css generator - ... (4)" both ended up in the GitHub tree at the bottom.

This could also be a TST issue or even a FF race condition or something, but seeing as I could reproduce it TSM I thought I would pass it along for any feedback.
By the commit https://github.com/piroor/treestyletab/commit/7230f32 TST now updates openerTabId with valid value, so I hope that updated openerTabId information is saved by TSM and tree is restored as expected.
I retested this issue today and got the same results. (Varying restore tab groupings using the same session)
However, while doing this I got to thinking about what might be causing this. I realized there is an option in TST to auto-group tabs if they are opened within a certain time frame.
I disabled this option and reran the test several times and I get consistent results now! (This makes sense as the session is restored tab-by-tab and if the system were able to open a certain tab within 100ms of the previous one, TST would group them together thus giving the appearance of random issues and\or parent-child issues.)
Thank you @piroor and @sienori for working on these great add-ons.
Sincerely,
Mike