Improve re-using existing data in the filescanner

cc @DeepDiver1975 @MTGap