Implement finish() in terms of FinalizeCode().