CHILD() and SUBNODE() improvements

Hi Volker,

please have a look at these commits and merge them if possible. More info in [AMCQ-2573].

Thanks
Silvan