fix PR4963: folding insertvalue would sometimes turn a packed struct into