Interesting, you are correct if you've set 'spawn at start' to no GG runs the _main function once then stops calling it until the entity is spawned.
So you could simply treat the first call as an extra initialisation phase and make the 'real' code only run from pass 2 onwards.
For example add a 'state' variable to the script:
local state = {}
Then in the _init function:
state[ e ] = nil
and then in _main:
if state[ e ] == nil then
state[ e ] = 'initialised'
return
end
…. real code
Been there, done that, got all the T-Shirts!