Fix a case where _get_config_value_for_remote could return None mistakenly