Its basically the engine pumps out too much torque for the gearbox to handle. Heavy accelerating and de-accelerating in 5th gear cause wear to the cog. As you know the bike uses a dry sump system and this enables the small metal partials to work there way around your engine, causing additional damage.
I've been quoted £650 plus parts, to have my engine rebuilt using a upgraded kit. This was from a leading Overland specialist in West Sussex England. This didn't include any additional parts that may be required like oil pump etc and suggested a figure more like £1000 plus vat.
It would be interesting to see what a Yamaha garage would charge, or if your handy with the spanners.... another option and the route I'll take it look at fitting another engine, I think the TDM 850 fits.
I was sure my box was shot, but it turned out to be a worn rear sprocket on the back wheel. Started to have oval indents and made hell of a noise.
If you buying cheap and have the work done, then you're sure before you leave on a big trip.
I hope it helps....