Fix non-scalar encodes.