Add rule for ending template blocks