When looking for files to index, walk folders to discard in reverse

This makes sure we don't skip folders after removed folders due to the
internal iteration index not being decremented.