In an XSL recursion, this
<xsl:with-param name="items" select="$items[position() > 1]
would normally work to recurse with all nodes but the first. But it only works if the nodes are elements. If they are a mix of element and text nodes, the recursion fails, since, for example, $items[3] returns the third element node, not the third node, regardless whether text or element.
So the expression sets the new $items to just the element nodes in the old $items. The text nodes are lost.