Support substituting in a different minErr AST