[Olena-patches] milena r1404: New method to check consistency of tree