To deal with a similar problem (Rattling D-Lock when suspended from saddle rails, so that the arch went through the rails, and the straight part of lock was hanging, horizontal / at 90° to the seatpost) I applied a few turns of that old favourite of everyone's, self-amalgamating tape, followed by couple of wraps of electricians tape to encourage inertness, to each seat rail.
The result was that the lock vibrated it's way through the 'insulation' in a very short space of time.
So this is one of those "Don't bother with this" tips.
HTH.