Add an integration test for array flattening.

This was already fixed, this test just makes sure it stays that way.
(fixes #406)