ditto to InstantiateTemplateParam

note: should refactor out some common code from these two classes