When it comes time to update t.next, x.next is no longer the original node following x, but is instead of itself!
Insert node t immediately after node x