The answer is it is difficult to say. One thing anyone cornering the market has to consider is government intervention. In this respect onions are perfect. They are merely a condiment. Nobody is going to starve for lack of onions if the rest of the food supply is intact. Thus any government official rushing in to intervene in a cornering of the onion market will look a little foolish and thus think twice about it.
If someone tried to corner the wheat market the government is likely to step in, confiscate his goods and pay him a fair price for his wheat which will be much lower than the cornered price. The cornerer will then lose money.
I suspect the congressman that passed the legislation did his research and talked to all potentially affected parties. I suspect the farmers and ranchers producing the other traded commodities said that this was not really a concern for them and that they would prefer that their commodities continue to be traded.