That looks like about the right solution, only a better place to do 1. is in the random_qtype->print_question method.
I have filed this as MDL-13110. I have been busy with other things since Christmas, and so am falling behind on bugs reported to the tracker. However, rest assured I will make time to work on them as soon as possible. Hopefully next week.
Ah...yes. You are correct. That would be a better place. Thanks for pointing that out.