Found the offending peice of code.
Actually, had to put in a bit of code that caused the problem. See, when generating the XML, I did it all at once(per entry) and did it from variables.
The problem was that the comment arrays wouldn’t get reset on each run, so if post 123 had comments and post 124 didn’t, post 124 would get the comments from post 123.
Move along, move along…