This issue can be fixed by modifying the autofill/autofill.lua source file. Add this line at the top of the file:
local Player = require("stdlib.event.player")
Then you need to add a few lines in the autofill function:
local function autofill(event)
local entity = event.created_entity
local player, pdata = game.players[event.player_index], global.players[event.player_index]
-- NEW LINES BELOW!!
if pdata == nil then
Player.init(nil, false)
player, pdata = game.players[event.player_index], global.players[event.player_index]
end