Generator: avoid creating empty group objects