When I first came to check the oil level, the dip stick was not attached to the filler cap. It seems this is a common problem due to the hostile nature of the oil tank environment.

TrackVRoad recommended a thorough cleaning of the surfaces and the use of 2-part expoxy to attached them. After a bit of reading around I found Unibond Repair Metal was well rated. This is good for up to 120C and is apprently oil resistant.
I used meths to clean and degrease the surfaces, and then filed the surface of the end of the disptick which looks like a valve to make it rough. I then mixed the 2-part metal filler on the back of an old numberplate and applied a thin coat to the dipstick end.
This has been left overnight to set, and will hopefully be a strong bond and not come off again. If it does, I might need to file all the remaining epoxy off the stem, and further roughen the inside of the valve cap.

