Hmm, seems like nodes created in confuncs are treated as statically created and cannot be removed via remove_childs (which removes only dynamically nodes).
I've added an extra parameter to the node creation functions allowing the creation of dynamic nodes. Usage:
local mail = ufo.create_control(mails, "mailheader", "mail" .. index, nil, ufo.DYNAMIC_CONTROL)
This solves the problem, however, I'm not happy with this solution. The solution forces the lua side to have knowledge about static/dynamic nodes and when to use them.
If I look at the code, I have the strong feeling that static nodes are only created during the initial script loading stage and are never created by events and confuncs. If that is the case, the switch between static/dynamic can be made after the parsing stage and it should not become an extra parameter on the lua side. I would like someone to confirm this so I can refactor the implementation.