what tuner are you running on the bike?
If none, remove the maxi-fuse, disconnect ECM, apply thin coat of dielectric grease to ECM, reinstall, and reinstall maxi-fuse.
My 2006 R JUST started doing this as well at 3500 mile on the ODO. I had it looked at by my dealer and of course they could not duplicate the issue. It's done it 5 times. It's more apt to do it when not fully warmed up but even after a long ride and pulling into the garage the idle dips and almost stall but not every time.
if you notice while you sitting at a red light and the cooling fans come on there is a moment in which the idle will drop and recover... the cooling fan pulls allot of power and if not properly tuned it could stall the engine...