Fix proposal bug in buildTree.