A friend recently booked a trip BNE-MAD via DXB. She selected the QF codeshare to DXB and then the EK flight number (A QF codeshare was available) to MAD. Same for the return She was showing me the itinerary and I pointed out the SC issue for the DXB-MAD leg, as well as the fact that as a QC member there would be no access to the lounge in DXB before the MAD flight. She attempted to change to the same flights with a QF number, over the phone, but as expected Qantas wanted the change fee (in this case it was not worth it - my friend would have pleaded ignorance to the recent 'enhancement' regarding lounge access on arrival in DXB!).
As it turned out (a week or so later), she needed to change the return date anyway, so in doing so changed all the flights to QF codes (same price as EK in this case).
It is frustrating that the rules have to be so variable and complex - but without that complexity, what would there be for us to discuss!!!