lazily create unique index