(GEP-203) Allow both definition and class names to match module name.
Make JSON output from Diagnostic more readable.