Note that this still allows duplicates. Bug: 21868011 (cherry-picked from commit dd32833e) Change-Id: Ifcb2cda465d9451c16b122185a260ca8cebc41c5