Ensure that entire text record gets consumed on parsing

Additional fix for #1371