Just to say, that I had a similar failure of the ABS module on my 07. Started after a hard stop that activated the system, and after running the diagnostic, *repeated* bleedings, and a master cylinder kit, I took it into Yamaha. They bled and bled to no avail. The way the mechanic explained it, there's captive grunge from old fluid, and when the system activates and valves move to take control of braking, the ooze moves and check valves stick and clog. IN my case, it prevented fluid from moving from the rear reservoir, though the ABS block to the rear caliper= no rear brakes.
I bought this bike in 2013 with 9000 miles on it (i.e., it sat). It has 42k now.
It's a $1500 part that the mechanic said he would try to discount. I've been dealing with them for years. Looking in the classified section here and on eBay for a used one.
Lesson, of course, is to flush this system. When I bled, my thinking was a couple reservoir volumes would do it. Mechanic said 4 pints to be safe.
Jim in BR