Problem/Motivation
Ran into this issue while creating triggering the display of a second modal through AJAX while the existing media library select widget is open already (the first modal).
Steps to reproduce
Make an AJAX call while the media library widget is open
Proposed resolution
Add a check to ensure that the selected counter does not exist before adding it.