Added restrictions on depth of the tree during combination.