bug #4522 Duplicate column names while assigning index

Signed-off-by: Marc Delisle <marc@infomarc.info>
Merge branch 'QA_4_2'