Fill simpleReferences with IDs using identities

The $simpleReferences don't containt the array with the IDs in some cases but they are in the identities. Then we can use the identities to fill the $simpleReferences.