And an assert() to head off a seg fault. See bug #21093.

This is just a stopgap measure to make the crash "nicer".
The actual bug does still need to be dealt with.