This assert caches a bug (instead of segfault)

But it does not fix it
Making the code a bit more sane