Remove no longer existing files from the cache when scanning external storage

Fixes #10355

@fernandoruiz can you check if this fixes the issue for you

cc @DeepDiver1975 @PVince81 @schiesbn