Keep in mind the 99 has an electronic speedo. So there maybe a mechanical portion of the cluster which is bad.
I have personally had problems with the wiring harness for the back half of the truck(mine was fuel related but the run together). In my case the cab seemed to settle on the the harness rubbing it till shorted out under the truck.
To check for this will need to get under the truck right under the drivers seat. Look for any rubbing of harnesses that come threw the body. Especially where the connectors are on the black plastic shelf. This may not be your problem buts it free to look at.
99 x-cab 4x4 4.0l auto
mods, cranked t-bars, silencer delete, k&n drop in, Rebuilt trans ,Trans Go stage 3 shift kit, 3200stall Fuddle Racing Torque Converter,
VANIR 63mm TB, Roush split rear exit exhuast, E-Fan, JBA Headers
Auto up/down both windows, OHC, EATC (soon to be modded)
03 Crown Victoria Police Interceptor