fixed lazy collection reference placeholder to determine its index dynamically so that nil ones can be removed