When xsl:key is used in backwards compatibility mode (version="1.0"), both the indexed value (the value of the use expression) and the sought value (the second argument to key()) should be converted to strings before comparison. This is being done for the sought value but not in all cases for the indexed value. The problem only manifests itself in the rather rare case where the use expression evaluates to a number or boolean.
A patch (module KeyManager) is being placed in Subversion. Test case backwards072 created.