The previous fix was incorrect / incomplete - basically any NULL value
passed to the sfunc threw away any accumulated state, so for example
a sequence  "0, 1, 2, NULL" would have NULL state as if there were no
values at all.