Fixed bugs caught by the new assertion implementation.