Rewrite the tree iterator for full ignorecase support