Always use the more specific template name first.

Fixes #8