I have looked at your so called good speed sensor again and it looks like the supply voltage to the speed sensor are missing sometimes !!!.
At first eye sight, I thought the signal was missing and indeed it does, but I´m more and more convinced that somewhere at the supply wire, that the voltage is being disturb - it could also be that sensor itself is shortcircuited.
With the help of the right wiring diagram i´m sure you will be able to pinpoint this problem correctly.