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.
Those types of tariffs typically just bring foreign imports up to the domestic range, so it doesn't really mean that domestic will be adopted first. If you wanted a targeted affect, you could put tariffs on the imports and subsidize the domestic manufacturers.