I've found that if the lens is removed from the camera, its not always recognised when replaced. Also after a while the ink seems to fade and needs re-coating.
I've ordered one of the replacement M mounts sold on Ebay which has the code notches machined in ready to accept paint. I'll report back when its been fitted.
I've had another go at coding the lens using the "Sharpie" marker pen method.
I found that using an actual Sharpie pen wasn't successful, even waiting for it to dry and going over it again, it never dried solid enough.
So I tried a CD marker pen and it worked! My M8 now sees my lens as a 28mm so should provide all the corner correction etc and give me EXIF data as well.