Handling sample heterogeneity in serial crystallography