Can't reproduce the problem. When I modify your stylesheet just slightly to
make comparing the two options easier:
<xsl:template match="a">
<xsl:param name="param1"/>
<first>
<xsl:apply-templates select="xalan:nodeset($param1)//b|b"/>
</first>
<second>
<xsl:apply-templates select="xalan:nodeset($param1)//b"/>
<xsl:apply-templates select="b"/>
</second>
</xsl:template>
... and run it against the sample file you provided, I get identical
content for the <first> and <second> elements.
I'm runnning current version of Xalan from CVS, so you may be seeing a bug
we've already found and fixed.