The shifter was only off by one when upshifting after gear 3, and it became corrected at gear 8. It was always correct when downshifting from 8.
Anyway, I replaced the cable and adjusted the derailleur from the start again. Everything works great now.