Mental illness played part in fatal Flora Hill crash, court told