Remove non-existent paths when trimming the index.