Fix inability to use custom template, and template list variable misuse for #931