Add debug assertion for doomsday case.