Child category level 3 not constains in child array

referring to the topic

I have set $ depth to 3 and it works fine, but how can it be done according to the art for v6.5.1?