Fixed a regression when marshalling arrays.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>