Diagnostics: capitalize the keys

Fixes #1609
Merge pull request #1610 from jugglingnutcase/patch-1

Diagnostics: capitalize the keys