In general, it's how the focus is adjusted in your optical sensor sample. It has to be focused on the micro-scratches on the surface to work, so you could try shimming up the feet. In three years Logitech may also have changed the sensor or assembly process too--they don't advertise what sensor their lowest-end mice use, so may switch suppliers at any time to reduce costs.
Laser sensors usually have an easier time with low-contrast backgrounds than optical ones (the coherent light from the laser is better at illuminating the scratches), although Logitech themselves claim only their two-laser "Darkfield" sensors will actually work on glass (Microsoft's competing BlueTrack can't do that!).