Fix bug in UniqueId when assigning new UIDs if the tsdb has not been set

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>