Do not cache indexes across async tasks
Capturing an index is unsafe as it could be out of date when this is processed. The user could have changed directory inserted a file or changed sorting order.
This probably fixes some bugs of out of date content, though this was found in code review rather than trying to fix anything in particular.