Allow overriding of flatten.

Flatten is currently problematic for some modules when
backdrop has to fill in lots of empty permutations. In
this case we should be able to turn flatten off.