Diagnostics: capitalize the keys

Fixes #1609