added need_new_tree function

somewhat more intelligent checks on whether the starting tree is valid.
This used to cause issues in the rare situation that someone quit their
analysis at an unfortunate point during the initial tree construction.