Improved ancestor checking more
Expanded manakai_append_text to improve parser performance