srt: Factor out last goto