_get_term_children can loop forever (well until it times out) if there is a loop in the hierarchy
|Reported by:||westi||Owned by:|
_get_term_children call's itself recursively to build the array of children. If there is for some reason a loop in the hierarchy it gets stuck and loops for ever trying to build the list of descendents.
Seeing as we fetch the whole hierarchy with _get_term_hierarchy we can probably just use that to build an array of descendents without recursion.
Otherwise we should leverage our loop detection code to find and maybe break loops.