Description
This has become an issue in #8456, but each return statement in the top level entry point writes its own function epilogue. We should really just have one epilogue and make return statements jump to this epilogue.
Also #8739 introduced an identical bug to the MSL writer.