flatten in cases where an empty nested array would confuse join.