Correct cherry-pick from active_support

uninitialized constant ActiveSupport::Autoload (NameError), sometimes,
at ramdom
https://github.com/rails/rails/issues/14664