Fix building problem for a template with nested mt-tag. bugid:109829