You forgot that perfectly valid science can lead to erroneous conclusions.
Though all too often nowadays, many "scientists" seem to have forgotten the null hypothesis*.
Good science is setting out to disprove the null hypothesis. Too many modern scientists, especially "climate" scientists who are that in name only, seem to want to prove the hypothesis, which leads to lots of erroneous conclusions.
*That is, in essence, if the hypothesis is that "humans are directly responsible for climate change, the null hypothesis is that humans are not directly responsible for climate change. A good scientist who hypothesizes the former tries to prove the latter in an unbiased manner.
Good science is about trying your damnedest to prove something wrong, and when you have tried everything, you end up with theory (or law) that something is, in fact, right.