Fix an error in the file icon handler when a very long file name is used.