If the problem was the unused levels of a factor not available in the new dataset, it seems appropriate to drop them with the droplevels() function. For example:
levels(droplevels(P17.sp@data$Pack))
Note: to make your example reproductible, it would be great to get access to the data. Thank you!