"$last" field CircularReferror : what is it

It’s best not to rely on the order of records in a group. Try MAX($group.date_created).