replmd: fix variable names in replmd_check_upgrade_links