Merge "Add trace for duplicating thread write" into main