### Elasticsearch Version

8.6.2

### Installed Plugins

mapper-size

### Java Version

_bundled_

### OS Version

3.10.0-1160.83.1.el7.x86_64

### Problem Description

Elastic mapper-size plugin fails on version 8.6.2 with updated templates for global, index, and component (both custom and managed).  It does work in 8.5.0

### Steps to Reproduce

Enable plugin, enable _size field, ingest data
![image](https://user-images.githubusercontent.com/11168913/224350960-498d5abd-62f5-4564-9f62-ac0702c2dd20.png)
![image](https://user-images.githubusercontent.com/11168913/224351072-977a4d34-68cb-448b-9fc3-86f223171de9.png)
![image](https://user-images.githubusercontent.com/11168913/224351165-e5ee1a54-216f-4b20-a571-a09ece65274c.png)
![image](https://user-images.githubusercontent.com/11168913/224351286-13593e3a-d9a2-4b47-ad3c-fa55ea63f4f5.png)

**Works in 8.5.0 though!**
![image](https://user-images.githubusercontent.com/11168913/224351648-5184f1df-0579-4d53-a7a1-97230570a1d5.png)



### Logs (if relevant)

_No response_
plugins/mapper-size/src/main/java/org/elasticsearch/index/mapper/size/SizeFieldMapper.java
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0 and the Server Side Public License, v 1; you may not use this file except
 * in compliance with, at your election, the Elastic License 2.0 or the Server
 * Side Public License, v 1.
 */
package org.elasticsearch.index.mapper.size;
import org.elasticsearch.common.Explicit;
import org.elasticsearch.index.mapper.DocValueFetcher;
import org.elasticsearch.index.mapper.DocumentParserContext;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.MappedFieldType;
import org.elasticsearch.index.mapper.MetadataFieldMapper;
import org.elasticsearch.index.mapper.NumberFieldMapper.NumberFieldType;
import org.elasticsearch.index.mapper.NumberFieldMapper.NumberType;
import org.elasticsearch.index.mapper.SourceLoader;
import org.elasticsearch.index.mapper.ValueFetcher;
import org.elasticsearch.index.query.SearchExecutionContext;
import java.util.List;
public class SizeFieldMapper extends MetadataFieldMapper {
    public static final String NAME = "_size";
    private static SizeFieldMapper toType(FieldMapper in) {
        return (SizeFieldMapper) in;
    }
    public static class Builder extends MetadataFieldMapper.Builder {