Corrects bug when processing 1x1 matrices in seq_array_ind

Hello,

This patch corrects a bug that occurred while I was trying to estimate a model with `optimizing`. One by one matrices produce an error in seq_array_ind at the end of the fitting procedure.
This is problematic if you have, for example, `d=rep(1L, 3)`.  How about adding the following after line `res <- array(1L, dim = c(total, len))`?

```
if (total == 1) return(res)
```