This law wouldn't apply to spices since there are no intellectual property rights involved in that product. (The "prior art" for grinding peppercorns probably dates back thousands of years.)
A better example might be a car that's manufactured in the U.S. but contains many parts that are manufactured abroad.
However, even if the courts upheld the lack of a first-sale doctrine on foreign goods, there would be risks for companies to assert these rights. For example, if Toyota demanded a cut of every resale of one of their cars, it would immediately lower the value of any Toyota relative to a U.S.-made car, since the resale value of a car is a significant part of its total cost of ownership. If this practice became widespread, the outcry would force Congress to pass laws to put an end to it (at very little political risk, since the losers would be in foreign countries).