FIX: Make favorite work with multiple grant badges (PR #13492)

Badges that are awarded multiple times can be favorite and not favorite at the same time. This caused few problems when users tried to favorite them as they were counted multiple times or their state was incorrectly displayed.

GitHub