Add can't-happen checks to diff generation.