Scenario
To avoid getting INVALID_KEY_OR_REF when processing Item groups.
Solution
In Item Group detail page in Basic subtab, there is a checkbox field called Include Start/End Lines. If this checkbox is unchecked, adding an Item Group via Web Services works fine.
However, when Item Group with unchecked field Include Start/End Lines is added via User Interface, the Item Group name line is not shown up.