Yes, policy is often self-defeating. However it's not exactly cancelling out: tariffs + subsidies transfer consumption of specific products to domestic producers, tariffs alone just reduce it. Subsidies alone would raise consumption and direct it domestically.
It goes without saying this all comes at the cost of everyone who's not receiving the subsidies.
It goes without saying this all comes at the cost of everyone who's not receiving the subsidies.