Fix another edge case when newlines in text nodes