Did you check the second fob?
Because, if a fob is pocket or purse held and the buttons are pressed inadvertently and repeatedly, the code will eventually get lost. After 128 or 256 unconnected press (that's without a handshake with the car), the code is lost and the fob requires to be reprogrammed. At least that's what was posted sometime last year...
But again, you say that your Dealer is clueless.
