UKHeliBob:
Are you sure that you saved the working code ?
Are you sure that you saved it with the right name ?
Are you sure that you saved it where you thought you did ?
Is there more than one file with the same name in two (or more) different places on your PC ?
Do you use any form of version control, even if it only numbering different versions so that you can go back to them ?
Sorry, I can post only once in 5 minutes as a noob.
As long as my reason is reliable, I am positive that I use the same code which worked well.
I saved it in RAR archive, in the sketch folder.
There are two source files - one .ino file and one .S file with assembly code.
Unfortunately, I don't use any means of version control, nor do I archive/snapshot source code on regular basis.