Returned to the old traversal: kd-tree construction works now