Fix flat_map for objects that don't respond to to_a.