Handle variable-sized arrays. Fixes #261