Fix a decoder problem with 2-element arrays.

If there are exactly two elements in the array, the decoder threads the first array value twice through the cache. This leads to wrong cache data because the wrong replacement goes in there.

Closes #15.