Fix iterator over empty tree