Fixes #18741
* Improve testing of code fixes, and improve diagnostic messages * Disambiguate `newFileContent` from `newRangeContent`