Well, what you change here can clear the rest of the duplicates leave behind, but it will also create iMaxRecent Filename keys. So I prefer to code it like this:

    for (int i = 0; i <  iMaxRecent; i++)
		{
			char keyName[64];
			sprintf(keyName,"FileName%d",i);

			std::string value = "";
            if (i < recentIsos.size()){
				recent->Set(keyName, recentIsos[i]);}
			else{
				recent->Delete(keyName);}