You need a test that ensures hierarchy is obeyed, i.e a child and the children of its children and so on aren't allowed:
Update your local repo and use OrderUtil.isType