No, it don't have to be a tree, that was just used as an explanation. It could be anything as long I have a hierarchy where the content of child levels is per definition also part of parent levels.
It seems to me like a common problem, so I guess there is a general term for that.