{{subst:x{{{1}}}|{{subst:substifx}}}}{{{2}}}{{subst:x{{{1}}}|{{subst:rightbraces}}}}

Substituting this template produces one or more new substitution template calls, allowing recursive change of a page, see meta:Help:Recursive conversion of wikitext.