When two xsl:key declarations have the same name, and match overlapping sets of nodes, the corresponding index may be incomplete, leading to the key() function not retrieving nodes that should be retrieved. Specifically, if the use expression for one xsl:key declaration selects values (A, B, C, D) for a node N, and the use expression for another xsl:key declaration selects values (P, Q, A, R) for the same node N, where A is a value that was already indexed, then the value R (more specifically, any value after the one that was already found in the index) is not added to the index.
A patch for the 9.1 branch is being added to Subversion. The bug is present in all known previous releases. A test case key307 is being added to the W3C test suite.