private void verifyIndex() {
            if (mode == ArrayMode.APPEND)
                throw new IllegalStateException("Cannot reference array elements with index once append is done");
        }
Try and verify that index mode is possible.
config/src/main/java/com/yahoo/vespa/config/ConfigPayloadBuilder.java