UPDATE: took it to my dealer and got it fixed. Apparently there are *two* speedometer cables which were bad and were replaced:
F5RZ-17260-A ($74.68)
F5RZ-17260-D ($21.97)
Now the speedo works, and this also fixed a problem which I'd thought was unrelated. The transmission had been having a problem that felt like a harsh shift or slippage at a certain gear and acceleration. I asked the shop to check this out too, and they report it was caused by the 2nd failed speedo cable which was confusing the powertrain computer. So that's fixed now too.