Adjust ci->nregs to prevent heap corruption