Better handling of recursive Arrays.

This also fixes #412.