tree iterator failing