That happens decently often. This is the reality for all systems aside from braking system in trucks perhaps, which are more sophisticated.
The decision to do an emergency break is the same problem fully self-driving cars need. You need to interpret sensory input and have a model of the environment.
Ironically some genius made these systems mandatory despite them being a safety concern. Granted, they tend to work if someone really falls asleep behind the wheel.