ivaynberg/select2 — pull request #1321 by jamesramsay (2013-05-16 06:40:16+00:00)
Title: Multiple ids on items now correctly unselected

It may be useful to include elements in the select drop down which act as a convenience selection and add many other items of the same id. For example:

- Australia (id: [1,2,3,4,5,6,7])
- New South Wales (id: 1)
- Victoria (id: 2)
- Queensland (id: 3)
etc

This change resolves the issue where removing one from a multiselect box causes the value to not be correctly updated because `indexOf( [1,2,3,4], ...)` returns `-1` because each element of the array should be checked individually.