Currently I have multiple configs that should prevent this.
match_mac yes; match_serial yes, match_serial yes, match_serial_type no
I'm not sure if the 2 entries of match_serial is a problem, the mac is the same for the duplicate entries so there should have been a match. The type is different in 4 of the 5 cases that I have found to be an issue.
We have a wiki page written up that describes what each of these matching rules do. It should help clear a few things up when creating your own matching rules.
Link - Matching Devices
I'm trying to figure out why 2 of the default rules are failing, match_mac and match_serial are both configure as yes and the duplicate devices have the same mac and serial number in their entries
In my first 2 instance one has a status of Production, the other Unallocated.
It appears that the 3rd instance is the same as the other 2, my last 2 instances are explained, one of the entries is corrupted and the other belongs to a manually imported entry where checking would not occur. It would appear that devices will not be matched is status is set to deleted or unallocated, unlike the wiki entry which states deleted only.