Robustness of birth-death and gain models for inferring evolutionary events