DRY the common generation loop

Which in itself is not terribly efficient but that's not a key factor
at the moment.