Bug #3424

Updated by Michael Kay almost 7 years ago

The data structure used to locate the index corresponding to When key() references a particular key name assumes that there cannot be two different key definitions with N, and when format-number() references a decimal format name N, we look for N in the same name applicable to a document. declaring package of the component containing the function call. This is incorrect: we should look in the containing package of the component. 

 Example test case that fails as a result: use-package-102. 

 There are two calls on key() here which correctly bind to different key definitions. However, when the second key definition is used, the code wrongly assumes that an index for that key definition already exists, when actually it is an index for a different key definition with the same name (in a different package).