Forwarded temporaries would never declare a temporary. Figure out all result types ahead of time so we can deal with those temporaries as well.
Need to take into account that gl_Position[i] needs to be rewritten as gl_out[i].gl_Position instead.