flat_map to support multiple values; ref #1902