Fix sorting of LiftRanges

To properly sort LiftRanges replace element entries with
&lt;element name="text">blah blah&lt;/element> with correct entry
&lt;text>blah blah&lt;/text>
Refactoring suggestion: this method could call FixBadTextElementsInXDocument (which then would need to take a XContainer instead of the derived XDocument, and should probably be renamed to FixBadTextElementsInXContainer). This would eliminate some code duplication.