Modified the definition of node depth.