A composable index template with no `template` defined in the body is mistakingly always assumed to not be a time series template. Even if it refers to a component template that has the `index.mode` setting set to `time_series` and the component template defines mappings with dimension fields or routing paths.

Incorrectly this causes to create a data stream with a tsdb index *without* time series start and end time settings set. The fact that this can happen is another bug and is being tracked #98833.

What should happen in this case is that a tsdb data stream is created with a valid tsdb backing index (with correctly generated time series start and end time settings).

This bug was found as part investigating #98792 and is the cause of that bug.
server/src/test/java/org/elasticsearch/cluster/metadata/MetadataTests.java
}
    public void testBuilderRemoveCustomIf() {
        var custom1 = new TestCustomMetadata();
        var custom2 = new TestCustomMetadata();
        var builder = Metadata.builder();
        builder.putCustom("custom1", custom1);
        builder.putCustom("custom2", custom2);
        builder.removeCustomIf((key, value) -> Objects.equals(key, "custom1"));
        var metadata = builder.build();
        assertThat(metadata.custom("custom1"), nullValue());
        assertThat(metadata.custom("custom2"), sameInstance(custom2));
    }
    public void testBuilderRejectsDataStreamThatConflictsWithIndex() {
        final String dataStreamName = "my-data-stream";
        IndexMetadata idx = createFirstBackingIndex(dataStreamName).build();
        Metadata.Builder b = Metadata.builder()
            .put(idx, false)
            .put(
                IndexMetadata.builder(dataStreamName)
                    .settings(settings(IndexVersion.current()))
                    .numberOfShards(1)
                    .numberOfReplicas(1)
                    .build(),
                false
            )
            .put(newInstance(dataStreamName, List.of(idx.getIndex())));
        IllegalStateException e = expectThrows(IllegalStateException.class, b::build);
        assertThat(
            e.getMessage(),
            containsString(