Gene testing could have saved weight-loss drug