LOL. That's easy, the "flawed" studies are much worse. At least the designers of useless studies don't pretend that their results will be useful.
You make a valid point, though. The system that funds patently useless study ideas is one that doesn't care about the ultimate value of study results, and the dishonest researchers that pretend to produce useful results, but don't, will continue to get funded. Michigan Congressman John Dingel made a run at this problem in the '90s, as have others since, but the problem seems to get worse and worse as the government's role in funding research continues to grow.
Possibly, the surest way to invest in research results into a therapy that is valid is in a start-up company that has been founded by the inventor of the compound. At least there, he's putting his money where his mouth is (assuming he didn't set the whole thing up as a way of defrauding potential big pharma buyers).