How do I force unique values within a multi-value set? When programming my own field and autocomplete widget, how can I ensure that each delta has a unique value?

I would like to handle the case as much silently as possible, so to not bother user with validation errors. Most gladly I would just prohibit the autocomplete test from returning the duplicate matches but as far as I can see, the autocomplete function does not accept any context, just the search string.

Should I then keep the already selected values in a session variable - would it be the Drupal way?
It might be easier to filter the autocomplete results using JS. You could either extend the prototype being used by Drupal or use some sort of trigger for when the results are being displayed.

I don't think that server-side solutions such as session variables and so on are practical as there's no guarantee that the results of previous calls were actually used by the user. Similarly, hacking the autocomplete feature to perhaps send existing values along with current user input is inherently impractical.