A person dismisses an otherwise valid argument, because some of its proponents support it for the wrong reason.
How is this fallacy called?
EDIT: Here is an example. A person defends the idea that the earth is flat. In an interview he asks several skeptics and each one of them responds "The earth is round because if you dig deep enough you'll reach the other side". The person then shows that this is a circular argument and then concludes that the earth is flat.