I'd add a comment here that combining nodes can remove x from the list before iteration completes -- I'm assuming that's what was occurring here and breaking before?