If you think your beer is contaminated after putting it into your kegs, should you chill it to stop bacteria from growing or leave it in the fermenting fridge at the same temp as before 18'C to allow any left over yeast to kill any remaining bacteria?
As was stated previously, yeast don't kill bacteria directly. They make the environment unfavorable for bacterial growth, primarily by acidifying the wort, removing oxygen and increasing the alcohol content.
Once ferementation is over, the yeast have done all they can to thwart bacterial growth. In fact, as fermentation comes to an end, the pH will rise, making life a little easier for any contaminants. Further more, racking will introduce some oxygen into the beer (unless you do it as a closed CO2 transfer.) and most common contaminanting microbes are aerobic, and will get a "shot in the arm" from the newly introduced oxygen. Finally, raising or keeping the temperature at 18C increases the growth rate of the bacteria. As the yeast have probably consumed all the nutrients and gone dormant, the most they may do is scavenge the oxygen introduced, but there is no certainty.
For all these reasons, if you suspect the beer is contaminated, then chill after kegging and drink within a few weeks.