@NotNull
  static Collection<? extends IndexableIteratorBuilder> getLibraryIteratorBuilders(@Nullable Collection<? extends SyntheticLibraryDescriptor> before,
                                                                                   @NotNull Collection<? extends SyntheticLibraryDescriptor> after) {
    if (after.size() == 1 && before != null && before.size() == 1) {
      SyntheticLibraryDescriptor afterLib = after.iterator().next();
      SyntheticLibraryDescriptor beforeLib = before.iterator().next();
      //fallback to logic for SyntheticLibrary without comparisonId & excludeFileCondition
      if (afterLib.comparisonId == null && beforeLib.comparisonId == null &&
          !afterLib.hasExcludeFileCondition && !beforeLib.hasExcludeFileCondition) {
        return createLibraryIteratorBuilders(beforeLib, afterLib);
      }
    }
    List<IndexableIteratorBuilder> result = new ArrayList<>();
    for (SyntheticLibraryDescriptor afterLib : after) {
      SyntheticLibraryDescriptor libForIncrementalRescanning = afterLib.getLibForIncrementalRescanning(before);
      if (libForIncrementalRescanning != null) {
        result.addAll(createLibraryIteratorBuilders(libForIncrementalRescanning, afterLib));
      }
      else {
        result.add(new SyntheticLibraryIteratorBuilder(afterLib.library, afterLib.presentableLibraryName, afterLib.getAllRoots()));
      }
    }
    return result;
  }
@NotNull
  static Collection<? extends IndexableIteratorBuilder> getLibraryIteratorBuilders(@Nullable Collection<? extends SyntheticLibraryDescriptor> before,
                                                                                   @NotNull Collection<? extends SyntheticLibraryDescriptor> after)