It's always the smallest thing that stops these bikes, and I think I found the smallest of the small.
After running all the tests that I have described, I was thinking of cleaning the oil off the old sensor and giving it a polish. As I was handling it, I noticed what I thought was a very small black spot of crud on it. I tried to wipe it away, but on closer inspection I discovered that it was a hole, obviously put there by the manufacturer, and it was clogged with crud.
I realised that the hole was a vent to release the air above the diaphragm when the oil pressure below it moved the diaphragm. Moving the diaphragm breaks the connection between the switch points so the warning light goes out. If the vent is clogged, then the pressure above the diaphragm increases and makes it impossible for the oil pressure to move the diaphragm, so the switch points stay closed.
Using a fine piece of wire, I cleared the crud; refitted the sensor and started the engine. The light went out straight away and remained out until I stopped the engine.
So now we all know how the oil pressure sensor works and what can cause it to send an erroneous message to us.
You do not have the required permissions to view the files attached to this post.