COSMIT: Fix up a loop.
COSMIT: Better assert.