That's great. Thanks @Phaedrux. The rest of the print is back on now and it's looking perfect, it mightn't leave any visible line.
I took the gcode in question and previewed it in S3D and visually matched it with the failed print. Then I went on and deleted all previous lines in a code editor and checked the result, once happy I did the steps Phaedrux outlined but sent G92 Z238.2 at the end instead, the actual height of the failed print. And it worked flawlessly. Luckily it failed at a solid infill layer, so any damage will be covered up.
@dc42 Any idea why the Duet Wifi crashed?
Many thanks.