smartxml: fix detaching element node with adjacent text nodes