fixes #6010 - delete gem entries that are listed more than once