We fixed this weeks ago but I haven't gotten around to typing it up yet so lemme do that.
Turns out that there wasn't a single thing wrong with the wiring. It's just that the cdi box was getting interference from the lighting coil. Which should never happen but the box had failed in an odd way. Without the lights hooked up it worked fine but with them it misfired above a certain rpm. Different box and the problem was gone.
Guess someone should put that in the wiki.