that's a more reasonable loop structure, although i'm still not sure why it locked so hard before.
and, it happens to work.
fetch:deep-grep jane$ node flatten.js
[ 'upper foo',
  'upper bar',
  'outer baz',
  'inner foo',
  'inner bar',
  'middle baz',
  'deep foo',
  'deep bar' ]