BUG/TST: Fix Excel writers with duplicated column names.

Test and fix for issue #5235