Bugfix: correctly detect duplicate column names.