Apply the fix to casArray as well, currently untested.  Re: #15.