Bring back the insert_thread_id function.