Implements #889 find_replace_templates() should accept a template SID