Push various CDH5.0 fixes upstream