BUG: Bug in take with duplicate columns not consolidated (GH6240)

closes #6240