It fails because the following check fails:
I suggest you find out why those paths aren’t remapped correctly. Try running the following in the rails console to look at cooked of those posts. Somewhere in there might be a clue…
current_db = RailsMultisite::ConnectionManagement.current_db
cdn_path = SiteSetting.cdn_path("/uploads/#{current_db}/original").sub(/https?:/, "")
Post.where("cooked LIKE '%#{cdn_path}%'").pluck(:cooked)