I don't know what else could be concluded from the combobox changing resulting in a different code appearing in the editbox, OTHER than "Hey, the combobox must control which code is copied". If, for SOME STRANGE REASON, you think that using the code for, say, card 12 when you put a card into slot 1, is the COMMON SENSE thing to do, then yes, THIS IS A COMMON SENSE PROBLEM.
Now, assuming you're doing all of that correct, what are you doing to activate this code? Also, if you're trying to use more than one code at the same time, it would help to say that too.
Edit: As a note, the XML file shouldn't be displaying "Partial card" for the code names in generation 5, but this isn't affecting the validity of the codes.