This is one way of doing it, but another useful way would be to do
~~~scala
if (group.isEmpty) Nil else List(group)
~~~
The rationale is that your version does not have the property that the grouped stream contains strictly less elements than the original one, making back pressure handling a bit questionable (depending on user expectations).