Make sure toTextArea can only be called once per instance

Closes #2822