Update elements-grouping.js to current spec.