Fix from dlw@Jade, use a hash table so that uid's bigger than 2048 work.