CRM-12997. Set id on all line items, not just the first.

http://issues.civicrm.org/jira/browse/CRM-12997