Bug 1037658 - work around a sequelize bug in findAndCountAll that counts rows from included tables
Bug 1037658 - Move csv helper functions to a higher scope