fix illegal memory read

- when incremental hash is computed on parameters it recurses even into
empty dynarrays underneath (stop this from happening)
- make dynarray length last ptr 0 based