This is just to say that I’ve now identified and fixed this problem.
The problem seems to have been caused by discontinuities in the row numbering of my Loop & Merge tables, e.g. 1,2,3,4,5,6,14,15…. These discontinuities occurred after I removed some rows from the middle of the tables (apparently the rows aren’t automatically re-numbered).
There were no longer any problems with the QRTE parser output after I changed all of the Loop & Merge tables so that there were no longer discontinuities in the row numbering.