[2.3] - Should take care of resources duplication/reordering when a custom ...

`tree_root_id` is defined (never ending fix!)

See #11343

There are too much places to affect this (and we event did not consider a `tree_root_id` could be defined in a context setting (not sure how it would behave).
Shouldn't we perform the check in `modResource::save` instead ?