This ensures that any text nodes created using Element#inner_text= have their parent node set correctly.