This test is only necessary if we end up with a ragged array.  Right now that should basically be impossible with a compiled Stan model so it's possible this check is unnecessary complexity.  From the C++ API perspective it's a necessary check though so it's hard to say what the right course is.  I guess it's likely to be cheap so there's little harm leaving it in unless we find something later.