fix up handling degenerate tree situations