public static void validateNestedFormLoop(final String formName, final NestedFormLoader nestedFormLoader, final String targetForm)
    throws CodeGenerationException, RecursiveFormNestingException {
    HashSet<String> usedFormNames = new HashSet<>();
    if (targetForm != null) {
      usedFormNames.add(targetForm);
    }
    validateNestedFormLoop(usedFormNames, formName, nestedFormLoader);
  }
public static void validateNestedFormLoop(final String formName, final NestedFormLoader nestedFormLoader, final String targetForm)