Double inefficiency in optimally organized firms