Add a missing deref and a test case for that.
Use arrayLength in Frontend instead of constructing a function call manually.
Merge pull request #82 from pjonsson/bugfixes

Add a couple of missing derefs+testcase.