Yes, they were precipitated by error. He complained about a flag. A flag that was picked up because it was determined to be in error. If the flag had never been thrown, there is no argument, get it?
No, what I'm arguing is that the referees correctly used their discretion and declined to call an outcome-determinative and discretionary penalty on a player for arguing against a call that was wrong, and ultimately reversed. The helmet thing is a non-starter, he was a substitute, not a player, and didn't remove his helmet. You are arguing that the officials should have called an unsportsmanlike conduct penalty because a substitute left his designated area. I hope every time you see a coach doing the same without being flagged, you run to the board and get similarly riled.