Fixing unique rows and indices calculation for a given array with duplicate rows.

Signed-off-by: Renato Stoffalette Joao <renatosjoao@gmail.com>