composer: save/restore item groups (fixes #7675)