I'd update the cart to include the size as unique... but you could just change the id number to make it unique... add another number to the end.
You could also update the cart object to convert the ID to a text value instead of integer and append the size to the ID itself.