Why do I get 'Text objects can't nest' exception when writing text?

Q I'm doing some work merging text into PDF,

Could you please explain why I got the following exception:
  Exception: Message: Text objects can't nest
A: PDF format does not allow nesting text blocks. The error means that
you are creating one text block (builder.CreateTextBegin()) within
another. This is sometimes indication that you forgot to close a
previous text block (e.e. using writer.WriteElement
(builder.CreateTextBegin())) .