Make flatten attributes optional.