use std::iter::FlatMap instead of our own UnboxedFlatMap