I cannot delete this post but I have found out where the probem was. Firstly I changed the statement to include more brackets...
if ( (3rdIDfield.nodeTypedValue == 2ndIDfield.nodeTypedValue) && (3rdIDfield.nodeTypedValue !== ""))
I created a variable to ascertain the ID for the cloned row:
var 2ndIDfield = 2ndList.item(x).selectSingleNode("my:2ndItemID");
Then I set the value of the ID of the cloned row to the next unique ID:
2ndList.item(x).selectSingleNode("my:2ndItemID").nodeTypedValue = newWorkItemID;
My subsequent for...if statements compared the value of the variable 2ndIDfield.nodeTypedValue. I expected this variable to retain the original value and not retain reference to the actual node thereby altering as I changed the values within the cloned row.
Well i know this now, and apologies if this rambling makes no sense.....