"If we shake the sensor unit new and old the light flickers." - Would suggest to me the wiring close to the sensor unit, or crappy connectors at the sensor unit. You may get some insight by gently waggling indvidual wires (maybe carefully holding everything else still).
Intermittent faults like that are a sheer pain.
You may find its a common fault and mentioned in online fourms.
Gary
December 2014