Bingo!
Taking the wheel out was easy, as was fixing the puncture - I had a spare tube so fitted that, the punctured tube is now also fixed - but where it went wrong was re-assembly. The mistake I was making was in trying to fit the lock-ring with the gear cable still in situ. Once I unhooked it from the chainstay end that provided enough slack to fit the lock-ring and put it all back together.
All the while I was doing it wrong I was wondering how on earth it could be done at the roadside, probably in the rain (as is so often the case), but now that I know how to do it correctly it's just as easy as it would be on a derailleur set-up.
I'm actually chuffed to bits. It's nice to learn a new skill. Here's a couple of photos of the offending nail..
Looks pretty big eh?
Wow! I'm thinking the reason it stayed straight is down to my balloon tyres. There's only one hole in the tube. It must have happened very close to home because I parked the bike up yesterday evening and as far as I was concerned all was well.
Here's what the Nexus hub looks like on my bike up close..
Lock-ring, lock nut & axle nut..
In theatre..
Once again, thanks to all who helped out. And also to Sheldon Brown for describing the lock-ring in detail.