private Item makeEquivCompatible(Item item) {
        if (item instanceof AndItem || item instanceof WeakAndItem) {
            PhraseItem phrase = new PhraseItem();
            List<Item> children = ((CompositeItem)item).items();
            if (children.isEmpty()) return phrase;
            String index = ((IndexedItem)children.get(0)).getIndexName();
            for (var child : ((CompositeItem)item).items())
                phrase.addItem(child);
            phrase.setIndexName(index);
            return phrase;
        }
        else if ((item instanceof CompositeItem) && ((CompositeItem)item).getItemCount() == 1) {
            return makeEquivCompatible(((CompositeItem)item).getItem(0));
        }
        else {
            return item; // Compatible, or can't be made so
        }
    }
A special purpose check used to simplify the above
container-search/src/main/java/com/yahoo/prelude/semantics/engine/Evaluation.java