Fixed retrieving relation from collection in ToMany component

The relation's identifier is used for container name, but the underlying collection uses zero-based indices.