Fixes #6238 - empty list in csv adapter does not work

The csv adapter should print the headers on empty list