Exactly what Raginsheep said. You still retain your own HSC exam mark. So there is absolutely no reason to just fail your externals if you are ranked first.
When you are ranked first, only your assessment mark will be moderated to the highest HSC exam mark, whether or not that is your own mark or someone elses.
The average is still taken to obtain your HSC mark.
This is one of the more common misinterpretations I've noticed people have made. Along with thinking inputting school marks into SAM and expected it to be accurate.
I think I'll post a thread about the common misconceptions students who try to understand the system make sometime in the near future.