j/treebuild: fix generated code