public List<QueryProfile> inherited() {
        if (isFrozen()) return inherited; // Frozen profiles always have an unmodifiable, non-null list
        if (inherited == null) return List.of();
        return Collections.unmodifiableList(inherited);
    }
Returns the list of profiles inherited by this.
Note that order matters for inherited profiles - variables are resolved depth first in the order found in
the inherited list. This always returns an unmodifiable list - use addInherited to add.
container-search/src/main/java/com/yahoo/search/query/profile/QueryProfile.java