unique will also be assigned a unique port index at the end of the port list. That ensures that the unique names are all properly found in the extracted .subckt for the cell.