The Japanese manufacturer of a train that derailed in Taiwan, killing 18 people, said it has discovered a design flaw that failed to alert the central control system that an automatic safety feature had been turned off.