Simplify namespace serialization in test/tree-construction.lua