[BISERVER-8989] Fixing getTree depth