args here is assumed as one value, but we can pass several values as arguments to the child view, so this is probably wrong.

dom_id data member here is set directly, views let set it via hook_views_pre_view(), so that seems to be wrong too.

Set $child_view->is_attachment to TRUE

The mentioned warning happens on views theme/theme.inc when $view->is_attachment is empty, which is originally used to prevent attached views to show a dom_id, which they do not have.
This is hack I guess, but setting it to TRUE by pass that template variable assignment, so it also seems to fix the problem.

After a quick review Daniel mentioned if we should use preview() method.
I think that method should not be used in that portion of views_field_view. render() method is used directly instead, so calling preview() does not make sense on the aggregate query option of views_field_view, which tries to avoid executing the query many times, and executes it once on pre_execute().

@damiankloip: Yes, and as mentioned, that doe snot make sense in the context of the vies_field_view aggregation option, so I am each time more convinced that the right solution is to run pre_execute() as the first patch on comment 4.