5017: Don't index into an empty list