Adds proper handling of interspersed text to the semantic tree.