AddTextLine adds an extra line break


I am trying to fill a text node with some text, I always get an extra LF character at the end. Both AddTextLine(s), InsertTextLine(1,s) and  TextLine(1)=s always do this for me.

The presence of the extra LF does not affect the rendering, but is clearly visible in the Text Editor (as a new line) and in the Element Info (as a black box after the last character)

It is saved in the file somehow, but not as a separate text element, as far as I can see.

I can easily remove the extra line in the editor, but when I modify the text node via COM or VBA, the extra line pops up again.

Is it some known feature, or am I doing something wrong? Is there any way to get rid of it?