Fix logic for determining primary blank template.