public static @NotNull Map<String, XmlAttributeValue> collectFileIds(final @Nullable XmlTag currentTag) {
    if (currentTag == null) return Collections.emptyMap();
    final PsiFile containingFile = currentTag.getContainingFile();
    return collectFileIds(containingFile, false);
  }
public static @NotNull Map<String, XmlAttributeValue> collectFileIds(final @Nullable XmlTag currentTag)