non-monkey version of flat_map support for 1.8.7