Simplifying some diagnostics so that they don't need to work with StringRefs. No functional changes intended.