Fix "bundle exec rails mastodon:setup" crashing in some circumstances (#16976)
Fix "bundle exec rails mastodon:setup" crashing in some circumstances (#16976)

Fix regression from #16896
im-in-space/mastodon,glitch-soc/mastodon,maa123/mastodon,MitarashiDango/mastodon,masto-donte-com-br/mastodon,lindwurm/mastodon,ykzts/mastodon,lindwurm/mastodon,abcang/mastodon,musashino205/mastodon,ikuradon/mastodon,yukimochi/mastodon,tootcafe/mastodon,maa123/mastodon,pinfort/mastodon,MitarashiDango/mastodon,masto-donte-com-br/mastodon,koba-lab/mastodon,abcang/mastodon,yi0713/mastodon,lindwurm/mastodon,maa123/mastodon,gol-cha/mastodon,MitarashiDango/mastodon,koba-lab/mastodon,gol-cha/mastodon,theoria24/mastodon,ikuradon/mastodon,ykzts/mastodon,im-in-space/mastodon,Ryanaka/mastodon,ykzts/mastodon,tootcafe/mastodon,abcang/mastodon,h3zjp/mastodon,imas/mastodon,cobodo/mastodon,Kirishima21/mastodon,glitch-soc/mastodon,yi0713/mastodon,lindwurm/mastodon,yi0713/mastodon,gol-cha/mastodon,masto-donte-com-br/mastodon,ikuradon/mastodon,Kirishima21/mastodon,im-in-space/mastodon,h3zjp/mastodon,Kirishima21/mastodon,pinfort/mastodon,Ryanaka/mastodon,pinfort/mastodon,masto-donte-com-br/mastodon,im-in-space/mastodon,koba-lab/mastodon,glitch-soc/mastodon,theoria24/mastodon,imas/mastodon,MitarashiDango/mastodon,Ryanaka/mastodon,cobodo/mastodon,tootcafe/mastodon,imas/mastodon,pinfort/mastodon,maa123/mastodon,musashino205/mastodon,cobodo/mastodon,yukimochi/mastodon,ikuradon/mastodon,musashino205/mastodon,theoria24/mastodon,h3zjp/mastodon,yukimochi/mastodon,Kirishima21/mastodon,musashino205/mastodon,gol-cha/mastodon,abcang/mastodon,glitch-soc/mastodon,h3zjp/mastodon,Ryanaka/mastodon,imas/mastodon,cobodo/mastodon,yukimochi/mastodon,ykzts/mastodon,tootcafe/mastodon,koba-lab/mastodon,theoria24/mastodon,yi0713/mastodon