Optimizer can now build main script file!

I have no idea how this code worked at all before this... Like even
on the regular client.