A controversial sentence that spared a former swim coach from jail has been dramatically overturned, with an appeal court stepping in to ensure his crimes are formally recorded.