Haven't figured out yet why some rows are produced with this issue. I thought to review the code and put in a valid XML default if no value is returned but likely I'll never get to it. I work around ...
--If 1, gets the full stored procedure or running batch, when available --If 0, gets only the actual statement that is currently running in the batch or procedure @get_full_inner_text BIT = 0, --Get ...