some assertions to debug a bizarre bug