It happened on the A1 near Dunbar.
Neglect 'Among Child Death Factors'
Defects in the system responsible for the care of a toddler as well as "prolonged neglect'' were factors which contributed to his death, an inquiry has found.
Declan Hainey's body was found in his cot at his home in Paisley, Renfrewshire, in March 2010 when he would have been 23 months old.
His mother Kimberley Hainey was found guilty of his murder in 2011 after a trial at the High Court in Glasgow but the conviction was quashed by appeal court judges last year.
A fatal accident inquiry into the circumstances surrounding the child's death was held at Paisley Sheriff Court over 36 days between May and July this year.
In a written determination published today, Sheriff Ruth Anderson found a number of factors where the death might have been avoided.
She said the exact date and cause of death is unknown but added: "The prolonged neglect of Declan by his mother and sole carer Kimberley Hainey was at least a contributory factor in his death.''
Sheriff Anderson stated that if medical information relating to Declan's mother's alcohol and drug problems had been passed to all social work and health staff with responsibility for Declan, the case might have been handed differently.
She said: "Had the available information been obtained, it would have contributed in April 2008 to a more realistic assessment of the risks which existed in relation to Kimberley Hainey's ability to care for her son and would have continued to be an important factor in any continuing assessment process.''
The inquiry also found that if the agencies involved in the information-gathering process before and after Declan was born had obtained all the information which was available to them and assessed the risk factors realistically, it would have resulted in continued monitoring over a longer period of time.
She said health visitors should have been provided with all information available on the boy and his mother, which would have resulted in the case being categorised as one needing "intensive'' support.
In her written determination, the sheriff said: "Having determined that on a balance of probabilities neglect was a contributory factor, the following defects in the system contributed to Declan's death.
"There was no system in place whereby one of the agencies responsible for Declan's well-being was in overall charge and there was no system whereby one named individual was responsible for co-ordinating all available information.
"This defect resulted in no formal inter-agency meetings taking place, especially in the period from February 2009.
"Had such systems existed, then those responsible for the care of Declan would have been aware of all that was happening and all that was not happening, and steps would have been taken to protect him from the risks resulting from Kimberley Hainey's inability to take proper care of her son.''
She also said there was no system in place in relation to obtaining medical information and a "fundamental lack of knowledge by social work staff at the Royal Alexandria Hospital as to what information they were entitled and how they might obtain it''.
Had this information been available, decisions taken in the initial assessment process would have resulted in more protection for Declan, she ruled.
The 26 year old was first targeted in Briarscroft Road.
Euan Johnston was shot in his car last month.
The family of three crash victims took their case for the 59-year-old to be put on trial to the Appeal Court in Edinburgh earlier this year.
Most Viewed Pictures On Heart
Recently Played Tracks
To listen live, choose your preferred location:
Deposit £10 to get a £40 Welcome Bonus - That's £50 to play bingo, slots and more!*
Over 50 tracks to make you feel-good. New album out now...
Find your local four day weather report here.
Make Heart the soundtrack to your day and you could be a winner with great prizes up for grabs throughout the day.
Find out more about some of the companies advertising on Heart Scotland- East.