I have created the workflow below which I think follows your steps to reproduce…
When I run this it looks to be working as I would expect, I don’t see an extra b in text2 on input A on the second compare and in the output I see 1 item in A, 2 in different and 1 in B which looks to match the data.
…
While looking at this again I have just noticed that for me the code node is not actually outputting all of the data which is a bit odd. Will do some more testing
@Jon Did you try just launch the workflow I provided without extra nodes? You should see the Code node output is changed by this later node. How is that possible?
Re-running the Code node helps
That was the first thing I did, I also ran it on 0.235.0, 0.231.3 and 1.0.0 to see if it was an odd version issue. As you have not filled out the template I am not sure which version you are running so was not able to test the same version.
I have finally managed to reproduce it, Turns out I just had to refresh the browser not sure why it was all good on 3 different versions but it does explain why I was seeing null as well. I have created an internal ticket for this which we are tracking as NODE-632.