Michael,
When I saw this earlier, I just assumed it was meant to function this way, but you requested I send in a note if I got a saxon local error.

If you try to use a local variable to set default parameter values in XSL:Iterate, an error is thrown:
This is with Saxon EE 9.3.0.5.
Description: *** Internal Saxon error: local variable encountered whose binding has been deleted

Here is an example of a simple script that throws the error:

<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xsl:template match="/">
        <xsl:variable name="children" select="count(//child)"/>
        <xsl:iterate select="//child">
            <xsl:param name="size" select="$children"/>
            <xsl:value-of select="concat('The age of this child is ',age,'.')"/>
        </xsl:iterate>
       
    </xsl:template>

</xsl:stylesheet>


Source file:

<parent>
   <child>
       <age>7</age>
       <eyes>blue</eyes>
   </child>
    <child>
        <age>8</age>
        <eyes>green</eyes>
    </child>
</parent>



--

"A false conclusion, once arrived at and widely accepted is not dislodged easily, and the less it is understood, the more tenaciously it is held." - Cantor's Law of Preservation of Ignorance.