Bah. WMC's thinking too much in the C paradigm.

The only way that sexp will possibly work, as-is, is if you do
when
--[condition]
--set-variable
----[return-value-variable]
----ship-create
------[...]
and then evaluate the variable.
The conditional is evaluated every frame. Action stuff should not go in the conditional part of the sexp for this reason. (Come to think of it, that might be an interesting way to repeat events as a substitute for "every-time" that doesn't flush the sexp tree.)
Because of the prohibition on return values, the de facto paradigm for writing sexps is to have the sexp do everything correctly or else fail. It's the mission designer's responsibility to ensure that the failure condition cannot take place.