Relates to https://github.com/elastic/elasticsearch/pull/14227 Original commit: elastic/x-pack-elasticsearch@7db90740dc