Modified formats.base.flatten() to allow zipping of table elements
before flattening