Changed DoRecursive to use const_iterator