The nodes in the original list are unique, and actually are the keys of some hashes, and the order in the list is based on one of them. The new ones (branches) are labels that group some old nodes based on values from other hash, and it's name will not duplicate any existing key. Being the first element of any nested list is enougth to know the type of it.
I think I'll start with about a thousand nodes in a list, and I don't know how "tall" the resulting tree will be. It'll depend on some tunning of the parameters.