Replace potentially memleak creating safety check of a "cannot happen"
condition with an assertion.