I have another possible solution for this. I am about 90% certain that this contributes to the issue. It seems mobile phones can interfere with Logitech Unifying keyboards. I have noticed that if I put my iPhone down on my desk right near the keyboard, I seem to have the issue more often. If I keep the phone at least two feet from my keyboard, I rarely have any issues. I expect that this is because they are both using 2.4 Ghz frequencies, and the signal from the phone can overwhelm the signal from the keyboard.
If you tend to put you phone on the table near the keyboard, try moving it to another location and see if this helps.