Build UI JS, callback needs reference to tree object (not comps!)

The reference to comps.children.push() fails since the callback happens after the function has returned. We need to keep a reference to the tree component itself, not return the children from this function.