Only do class_exists once.