Fix template scanner to properly parse nowiki tags