Replace legacy_recode with recode_string.