Modified code to accommodate multiple composite instances with the same asset id.

@david-daal