Here's what I do:
It's cheap, just buy a few ball-bungees, and you can place them and the lock as required to avoid cables and such. It may appear that it interferes with the water bottle, but it holds the lock loosely enough that it just pushes to the side when the bottle is removed or replaced. No rattling, either.
The only disadvantage is that it takes maybe 15 seconds to do or undo the bungees.
Edit: Note how the lower bungee is routed between the cable and the tube and therefore doesn't interfere with the cable.