[FIXED JENKINS-24412][FIXED JENKINS-24410] Save only ItemGroups

This reimplements #36 and #37 the way @jglick suggested.