[Compaction] Fix a corner case in SanitizeCompactionInputFilesForAllLevels