Pin polymer in templates

TBR

Depends on #3615.