Improve consistency of dmd error messages