fix list method returning duplicate uids
Listbox: calculate a mapping uid -> object once

Instead of looping through the list each time.
Also check that the list method does not return duplicate uids.