fix regression in #352
Merge pull request #380 from fommil/flatten_regression

fix scala 2.9 regression in #352