The lock washers are in the drop outs between the rack and the frame. The tyre keeps twisting to the left and fouling the frame. I think I have sorted it. I have loosened the left bolt and let the wheel sort of straighten itself naturally and re tightened the nut. It seems to be fine for now, but thanks for the help everyone. I'm glad I signed up to this forum.
I believe your problem lies in where you have the lock washers.
You definitely need the lock washer underneath the nut. It's serving no purpose whatsoever by being elsewhere. Basically it needs to be making contact with the nut to prevent it loosening.
Or, as Ian H has suggested, just replace the nut with one that has a captive washer in it.
Hope you get it sorted out soon, I know how frustrating these things can be.