Tested the bike thoroughly tonight at a dark area. Realized it only happens when fan comes on brake lever pulled. Checked battery connection and noticed both connections just a little loose. Tightened both up and flicker hardly noticeable. Will know better when I go for a long ride tomorrow after work. Fingers crossed. Anyway dealer will look at the electrics next week. By the way, mine is a 2016 s1000rr, similar enough to your xr.