recursively "freeze" the returned tree - instead of using lists to store

children, use tuples.