Prevent multiple calls to ActiveRecord::Core::ClassMethods#inherited.