private static void addContainerReferences(@NotNull PsiVariable variable,
                                             final @NotNull Processor<? super SliceUsage> processor,
                                             final @NotNull JavaSliceBuilder builder) {
    if (builder.hasNesting()) {
      ReferencesSearch.search(variable).forEach(reference -> {
        PsiElement element = reference.getElement();
        if (element instanceof PsiExpression expression && !element.getManager().areElementsEquivalent(element, builder.getParent().getElement())) {
          return addContainerItemModification(expression, processor, builder);
        }
        return true;
      });
    }
  }
private static void addContainerReferences(@NotNull PsiVariable variable,
                                             final @NotNull Processor<? super SliceUsage> processor,
                                             final @NotNull JavaSliceBuilder builder)