Makes thread_id unique in the thread table.