Rewrite the tree iterator for fuller ignorecase support.