private void addErrorIfSameSourceMultipleTimes(List<PageElement> pages, Set<Source> sources, Query query) {
        Set<String> sourceNames = new HashSet<>();
        for (Source source : sources) {
            if (sourceNames.contains(source.getName()))
                query.errors().add(ErrorMessage.createInvalidQueryParameter(
                        "Querying the same source multiple times with different parameter sets as part of one query " +
                        "is not supported. " + pages + " requests this for source '" + source + "'"));
            sourceNames.add(source.getName());
        }
    }
Currently executing multiple queries to the same source with different parameter sets,
is not supported. (Same parameter sets in multiple templates is supported,
and will be just one entry in this set).
container-search/src/main/java/com/yahoo/search/pagetemplates/PageTemplateSearcher.java