The script simply avoids going to the same location as Mafia claims it found the last semi-rare at. There is no reasonable way for it to determine that Mafia's recollection is incorrect. If it is, it's either a Mafia bug, or you collected one outside Mafia. In the later case, "set...