arrays as function arguments



There are things I don't understand about Maxima arrays, but this seems 
like a bug:

(C1) sumit(a,n) := block([s : 0], for i : 1 thru n do s : s + a[i], s)$
(C2) array(a,5)$
(C3) for k : 0 thru 4 do a[k] : k$

This is okay
(C4) sumit(a,4);
(D4)                                  10
(C5) array(b,5)$
(C6) for k : 0 thru 4 do b[k] : x$


But this isn't

(C7) sumit(b,4);
(D7)                                  10


Barton