I've got a couple of things for you;
1) Corrosion of the connector pins on the rear of the instrument cluster, and/poor fit. Look at the main connector at the back of the speedo cluster.
2) Speedometer sensor is problematic, and should be suspected in any speedometer issues. It is particularly prone to water damage and getting soaked with engine oil. It may start working again when it dries out. You should seal the joint at the rear of the sensor with mastic or other sealer, once dry. For oil damage try cleaning, drying, and sealing.
3) The sensor cable often rubs against the shift linkage by the swing arm. Check that, and tie the cable to a nearby bracket to prevent further wear.
Joe