Hi,
I stumbled across a design error at HierarchicalContainer#removeItem.
The problem becomes visible if you first add an item, then remove this item and add an item with the same itemId again.
First the method calls super.removeItem(itemId).
Then it calls isRoot(itemId).
But because the itemId is already removed this method returns always false.
So the itemid remains in roots.
As long as you never add this itemId again to the container this flaw keeps hidden.
I suggest to first check, if it’s a root, and then remove it from container.