Use underscore's flatten instead of homegrown