I beg to differ. Replacing the speedometer WAS the fix for me. Now, I am not saying that the problem is purely the speedometer in all cases, but in my case, with these symptoms, it was the problem, and the solution was replacement of the speedo. It is quite possible that a sending unit in other cases may actually be the problem.
the dealer replaced my speedometer as soon as I brought up the problem. It looked like a good fix for 18 whole miles, then right back to the random problems.