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.
Merge pull request #851 from alphagov/flatten-override

Allow overriding of flatten.