PIM-2241: Fix issue in CsvEncoder