Your template for match="/" applies templates to the children of "/", specifically to the <document> element. There's no explicit template for the <document> element so the default template gets invoked. In XSLT 1.0 this does
<xsl:template match="document">
<xsl:apply-templates/>
</xsl:template>
It doesn't do:
<xsl:template match="document">
<xsl:param name="modify"/>
<xsl:apply-templates>
<xsl:with-param name="modify" select="$modify"/>
</xsl:apply-templates>
</xsl:template>
This catches quite a few people out, so the spec has been changed in XSLT 2.0 - in 2.0 the built-in templates do pass parameters through.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference