Fix #186: Better replacement of tags for field template.