Don't mutate ErrorTrees when purely checking indices.

Also improve the behavior when indexing into subtrees using an index not
present in the tree.

Closes: #1328
3 files changed