As I understand it, the way to get the mileage credit after flying ON (assuming it doesn't clear on its own) is to call and ask the agent to retroactively switch the dates of travel. This can only be done after the flight is completed. This way they can restore your original booking class and credit the miles.
I recently flew SFO-ICN and ICN-SFO in Z, upgraded with miles. I was able to get them to apply this correction with a minimum of fuss (5 minutes total on the phone) and got the miles credited within a few days after. It's still pain, but I think the agents know how to fix it. If the one you get doesn't know how, call back until you get someone who does.