Fix bug that assumes parent/first node is lexeme when it may be PlainText or TreeNode