Clarify warning message for repeating section templates.
Refactor to split get_templates into different functions for different usages.