Perhaps you have a "logical problem";
When trying to XOG in the object instance and the subobject instance at the same time you are asking the system to create the object instance with a value that does not yet exist because the subobject instance has yet to be created.
Perhaps what you can do is XOG in the object instance and subobject instance without the parameterised lookup attribute, then immediately XOG in the object instance again with the attribute (since now the subobject instance will exist).
Alternatively you could code the NSQL in the parameterised lookup to return a default value when the subobject instance does not (yet) exists. Think then you might be able to just run the complete XOG.
(GUESSing here a bit)