I believe the two events I mentioned do have the same event encoding but they have different event indexes (since they occupy different places in the event tables). I was using the term event code to represent the event table index and it is this value that PAPI uses to work its way through the tables. Sorry if my choice of a label was misleading.
You are correct that both event strings will lead to the same encoding and therefore produce the same results when using them to count events. But the fact that they have different index values means that PAPI must be very careful how it uses these indexes. In particular converting an index into an event string and then back into an index does not always give back the same index we started with. Now that I understand this, I think I have a better chance of making the list code in PAPI work correctly. Now it is just a matter of trying another approach.