parseTemplates: parse in context, correctly handle transclusions with images