CC-5929: Certain long filenames can result in the extension getting cut off