A plane and helicopter over DC came within 500' of each other over DC barely 24 hours before the crash. They avoided collision because they were over 1000' and the TCAS was still active: https://www.youtube.com/watch?v=huVFZ__q2rI
During the day the only thing that was keeping those collisions from happening under 1000' was pilots seeing each other. At night the only thing keeping it from happening was luck.
The error is in allowing flightpaths to be so close to each other in distance and time.