this should be the right way of measuring seldepth. the maximum
selective depth of the whole tree, not the depth of the pv.