In XSLT, a call on the key() function using a key name (first parameter) that cannot be resolved at compile time may crash with the exception "Unknown name code -1". The error occurs on the path where the second argument to the key() function is potentially multi-valued.
A patch is being placed in subversion.
There are actually two bugs here. The first (in KeyFn.java) is that the code tries to use the variable holding the key name that was established at compile time, rather than the name given at run time. The former variable holds an unitialized value, so the key definition is not found. The second error (in KeyManager.java) occurs while trying to construct the error message, specifically when trying to display the name of the key definition that was not found.