def available_elements_within_current_scope(parent)
      @_available_elements = if parent
        parents_unique_nested_elements = parent.nested_elements.where(unique: true).pluck(:name)
        available_element_definitions(parent.name).reject do |e|
          parents_unique_nested_elements.include? e['name']
        end
      else
        available_element_definitions
      end
    end
def available_elements_within_current_scope(parent)
      @_available_elements = if parent
        parents_unique_nested_elements = parent.nested_elements.where(unique: true).pluck(:name)
        available_element_definitions(parent.name).reject do |e|
          parents_unique_nested_elements.include? e['name']
        end
      else
        available_element_definitions
      end
    end
Available element definitions excluding nested unique elements.