stream: Avoid g_assert expression with side effect