Replace an assert with a small hack.