The node you are looking for is at
Texinfo::Common collect_commands_in_tree($tree, $commands_list)
.