Port latest changes back from dmd repo