Just a wild guess, but one possible cause might be that a tube from the air correction solenoids is disconnected resulting in very lean mixture at mid-range throttle settings?
Therefore, able to rev with no load, but not under load?
Does it accelerate well if you can get the bike up in the revs?