I don't know the implications of failing an inspection, but don't buy unless A) the sale is contingent upon a pass, or B)The asking price is reduced by the cost of whatever it takes to make the car pass.
Beyond that, I say keep looking. There are deals to be had. Good Luck.
Mark