fix textconv leak in emit_rewrite_diff