The Recommendation API can end up with duplicate instances of the same Wikidata article for a given collection in its cache.
The method responsible for this is get_candidates_in_collection_page. While it’s still unclear how many issues this may cause, it is not the correct behavior and should be addressed to ensure data consistency.