[#70052598] Fix potential crash in treeErrors()

@macumber this should give you what you need. It seems to be running
fine here.