Four faults were detected in the safety system of a train involved in a fatal crash in Wales, investigators have said.