Fix scanning of templates with nowiki tags