Make sure all levels are contained in the tree