Some doomed migrants tried to enter UK days before death, court told