bug #4522 Duplicate column names while assigning index

Signed-off-by: Marc Delisle <marc@infomarc.info>