When referenced from <amp-list ... template="my-template"></amp-list> to <script id="my-template" type="text/plain" template="amp-mustache"> ... </template> AMP Validator showing error "Attribute 'template' in tag 'amp-list' contains a value that does not match any other tags on the page".
However, everything will work, but the page will be deleted from Google AMP Cache due to this error.
<amp-state id="items"><script type="application/json">[]</script></amp-state>
<button on="tap:AMP.setState({ items: items.splice(items.length, 0, items.length) })">Add item</button>
<template id="items-template" type="amp-mustache"><code>{{#.}}, {{/.}}{{.}}</code></template>
<script id="items-scripted" type="text/plain" template="amp-mustache"><code>{{#.}}, {{/.}}{{.}}</code></script>
<amp-list [src]="items" items="." layout="fixed-height" height="32" template="items-template"></amp-list>
<amp-list [src]="items" items="." layout="fixed-height" height="32" template="items-scripted"></amp-list>
AMP Validator will point to a line with amp-list referring to the template script[type=text/plain] by id items-scripted. However, everything will work.
Source test script: amp-mustache.html.zip

cc @ampproject/wg-caching
Sorry for the delay. Here's a minimal test case.
This requirement was added in #24267 (from http://cl/264646527); it seems it was too strict.
The solution is to add attrs { name: "id" add_value_to_set: TEMPLATE_IDS } inside the script tagspec at https://github.com/ampproject/amphtml/blob/26295bc28d43750dc7fb1550c2b1841426a7ac2b/extensions/amp-mustache/validator-amp-mustache.protoascii#L66
But first we need to make sure that all the dependents know how to find templates in script elements.
Yes all of amp-date-display 0.1, amp-date-display 0.2, amp-list 0.1, and amp-date-countdown 0.1 seem to support script element templates.
OK, fix is in master. It may take ~1 week to propagate.
@twifkak thank you very much!