[vala/wip/issue/601: 2/2] Update c-expected




commit ea21f1739bd9f9b2cf96ab40ae675883cd0a7549
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Jan 10 17:22:30 2022 +0100

    Update c-expected

 tests/asynchronous/bug595735.c-expected            |  14 +-
 tests/asynchronous/bug595755.c-expected            |  16 +-
 tests/asynchronous/bug596177.c-expected            |  16 +-
 tests/asynchronous/bug596861.c-expected            | 158 ++++----
 tests/asynchronous/bug597294.c-expected            |  24 +-
 tests/asynchronous/bug598677.c-expected            |  28 +-
 tests/asynchronous/bug598697.c-expected            |  28 +-
 tests/asynchronous/bug599568.c-expected            |  46 +--
 tests/asynchronous/bug600827.c-expected            |  14 +-
 tests/asynchronous/bug601558.c-expected            |  38 +-
 tests/asynchronous/bug602594.c-expected            |  20 +-
 tests/asynchronous/bug612641.c-expected            |  26 +-
 tests/asynchronous/bug613484.c-expected            |  14 +-
 tests/asynchronous/bug614294.c-expected            | 198 +++++-----
 tests/asynchronous/bug620740.c-expected            |  20 +-
 tests/asynchronous/bug626053.c-expected            |  32 +-
 tests/asynchronous/bug639591.c-expected            |  66 ++--
 tests/asynchronous/bug640721.c-expected            |  14 +-
 tests/asynchronous/bug641182.c-expected            |  46 +--
 tests/asynchronous/bug646945.c-expected            |  60 +--
 tests/asynchronous/bug652252.c-expected            |  14 +-
 tests/asynchronous/bug653861.c-expected            |  16 +-
 tests/asynchronous/bug654336.c-expected            |  38 +-
 tests/asynchronous/bug654337.c-expected            |  44 +--
 tests/asynchronous/bug659886.c-expected            |  44 ++-
 tests/asynchronous/bug661961.c-expected            |  18 +-
 tests/asynchronous/bug710103.c-expected            |  62 ++--
 tests/asynchronous/bug741929.c-expected            | 244 +++++++------
 tests/asynchronous/bug742621.c-expected            |  20 +-
 tests/asynchronous/bug762819.c-expected            |  26 +-
 tests/asynchronous/bug777242.c-expected            |  36 +-
 tests/asynchronous/bug783543.c-expected            |  24 +-
 tests/asynchronous/bug789249.c-expected            | 114 ++++++
 tests/asynchronous/bug792660.c-expected            |  16 +-
 tests/asynchronous/bug792942.c-expected            |  80 ++--
 tests/asynchronous/bug793158.c-expected            |  16 +-
 tests/asynchronous/captured-fixed-array.c-expected |  34 +-
 tests/asynchronous/catch-error-scope.c-expected    |  98 ++---
 tests/asynchronous/catch-in-finally.c-expected     | 402 +++++++++++----------
 tests/asynchronous/closures.c-expected             |  68 ++--
 .../constructor-argument-check.c-expected          |  48 +--
 tests/asynchronous/finish-name.c-expected          |  90 +++--
 tests/asynchronous/generator.c-expected            | 116 +++---
 tests/asynchronous/nowrapper.c-expected            |  32 +-
 .../out-parameter-free-on-error.c-expected         | 128 +++----
 tests/asynchronous/result-pos.c-expected           | 114 +++---
 tests/asynchronous/yield.c-expected                |  28 +-
 tests/dbus/async-errors_client.c-expected          | 282 ++++++++-------
 tests/dbus/async-errors_server.c-expected          | 104 +++---
 tests/dbus/async-no-reply_client.c-expected        | 260 ++++++-------
 tests/dbus/async-no-reply_server.c-expected        |  48 +--
 tests/dbus/async_client.c-expected                 | 148 ++++----
 tests/dbus/async_server.c-expected                 |  90 +++--
 tests/dbus/bug783002_client.c-expected             |  92 ++---
 tests/dbus/bug783002_server.c-expected             |  82 +++--
 tests/dbus/dynamic-method_client.c-expected        | 128 +++----
 tests/dbus/filedescriptor-async_client.c-expected  | 228 ++++++------
 tests/dbus/filedescriptor-async_server.c-expected  | 160 ++++----
 tests/dbus/no-reply_client.c-expected              | 266 +++++++-------
 tests/generics/member-dup-destroy.c-expected       |  52 +--
 tests/genie/class-abstract.c-expected              |  24 +-
 tests/methods/bug639054.c-expected                 |  46 +--
 .../methods/prepostconditions-captured.c-expected  |  48 +--
 .../interface-abstract-async-override.c-expected   |  16 +-
 .../objects/interface-async-base-access.c-expected |  40 +-
 .../interface-async-captured-generic.c-expected    |  24 +-
 .../objects/interface-virtual-override.c-expected  |  20 +-
 tests/objects/property-array-length.c-expected     |  54 +--
 tests/parser/yield-return.c-expected               |  88 +++--
 69 files changed, 2806 insertions(+), 2342 deletions(-)
---
diff --git a/tests/asynchronous/bug595735.c-expected b/tests/asynchronous/bug595735.c-expected
index 377573847..485d39377 100644
--- a/tests/asynchronous/bug595735.c-expected
+++ b/tests/asynchronous/bug595735.c-expected
@@ -391,14 +391,16 @@ bar_real_do_foo_co (BarDoFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Bar*
diff --git a/tests/asynchronous/bug595755.c-expected b/tests/asynchronous/bug595755.c-expected
index 4a3b786c2..1efa42c4b 100644
--- a/tests/asynchronous/bug595755.c-expected
+++ b/tests/asynchronous/bug595755.c-expected
@@ -135,15 +135,17 @@ foo_do_foo_co (FooDoFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_signal_connect_object (_data_->self, "bar", (GCallback) ___lambda4__foo_bar, _data_->self, 0);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_signal_connect_object (_data_->self, "bar", (GCallback) ___lambda4__foo_bar, _data_->self, 
0);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Foo*
diff --git a/tests/asynchronous/bug596177.c-expected b/tests/asynchronous/bug596177.c-expected
index f80ac45e7..daed76f48 100644
--- a/tests/asynchronous/bug596177.c-expected
+++ b/tests/asynchronous/bug596177.c-expected
@@ -150,15 +150,17 @@ foo_do_foo_co (FooDoFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->t = _data_->self->priv->t_type;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->t = _data_->self->priv->t_type;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Foo*
diff --git a/tests/asynchronous/bug596861.c-expected b/tests/asynchronous/bug596861.c-expected
index 8139574a9..ad340387d 100644
--- a/tests/asynchronous/bug596861.c-expected
+++ b/tests/asynchronous/bug596861.c-expected
@@ -109,33 +109,93 @@ foo_co (FooData* _data_)
        }
        _state_0:
        {
-               _data_->_state_ = 1;
-               foo (foo_ready, _data_);
-               return FALSE;
-               _state_1:
-               foo_finish (_data_->_res_, &_data_->_inner_error0_);
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       goto __catch0_g_error;
-               }
-       }
-       goto __finally0;
-       __catch0_g_error:
-       {
-               g_clear_error (&_data_->_inner_error0_);
                {
-                       _data_->_state_ = 2;
+                       _data_->_state_ = 1;
                        foo (foo_ready, _data_);
                        return FALSE;
-                       _state_2:
-                       foo_finish (_data_->_res_, &_data_->_inner_error0_);
+                       _state_1:
+                       {
+                               foo_finish (_data_->_res_, &_data_->_inner_error0_);
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       goto __catch0_g_error;
+                               }
+                       }
+                       goto __finally0;
+                       __catch0_g_error:
+                       {
+                               g_clear_error (&_data_->_inner_error0_);
+                               {
+                                       _data_->_state_ = 2;
+                                       foo (foo_ready, _data_);
+                                       return FALSE;
+                               }
+                               _state_2:
+                               {
+                                       foo_finish (_data_->_res_, &_data_->_inner_error0_);
+                                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                               goto __catch1_g_error;
+                                       }
+                               }
+                               goto __finally1;
+                               __catch1_g_error:
+                               {
+                                       g_clear_error (&_data_->_inner_error0_);
+                                       _data_->result = 0;
+                                       g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                                       if (_data_->_state_ != 0) {
+                                               while (!g_task_get_completed (_data_->_async_result)) {
+                                                       g_main_context_iteration (g_task_get_context 
(_data_->_async_result), TRUE);
+                                               }
+                                       }
+                                       g_object_unref (_data_->_async_result);
+                                       return FALSE;
+                               }
+                               __finally1:
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", 
__FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                                       g_clear_error (&_data_->_inner_error0_);
+                                       g_object_unref (_data_->_async_result);
+                                       return FALSE;
+                               }
+                       }
+                       __finally0:
                        if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                               goto __catch1_g_error;
+                               g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
+                       }
+                       _data_->_tmp0_ = g_new0 (gint, 3);
+                       _data_->_tmp0_[0] = 1;
+                       _data_->_tmp0_[1] = 2;
+                       _data_->_tmp0_[2] = 3;
+                       {
+                               _data_->e_collection_length1 = 0;
+                               _data_->_e_collection_size_ = 0;
+                               _data_->e_collection = _data_->_tmp0_;
+                               _data_->e_collection_length1 = 3;
+                               for (_data_->e_it = 0; _data_->e_it < _data_->e_collection_length1; 
_data_->e_it = _data_->e_it + 1) {
+                                       _data_->e = _data_->e_collection[_data_->e_it];
+                                       {
+                                       }
+                               }
+                               _data_->e_collection = (g_free (_data_->e_collection), NULL);
+                       }
+                       _data_->_tmp1_ = g_new0 (gint, 3);
+                       _data_->_tmp1_[0] = 1;
+                       _data_->_tmp1_[1] = 2;
+                       _data_->_tmp1_[2] = 3;
+                       {
+                               _data_->_vala1_e_collection_length1 = 0;
+                               _data_->__vala1_e_collection_size_ = 0;
+                               _data_->_vala1_e_collection = _data_->_tmp1_;
+                               _data_->_vala1_e_collection_length1 = 3;
+                               for (_data_->_vala1_e_it = 0; _data_->_vala1_e_it < 
_data_->_vala1_e_collection_length1; _data_->_vala1_e_it = _data_->_vala1_e_it + 1) {
+                                       _data_->_vala1_e = _data_->_vala1_e_collection[_data_->_vala1_e_it];
+                                       {
+                                       }
+                               }
+                               _data_->_vala1_e_collection = (g_free (_data_->_vala1_e_collection), NULL);
                        }
-               }
-               goto __finally1;
-               __catch1_g_error:
-               {
-                       g_clear_error (&_data_->_inner_error0_);
                        _data_->result = 0;
                        g_task_return_pointer (_data_->_async_result, _data_, NULL);
                        if (_data_->_state_ != 0) {
@@ -146,61 +206,7 @@ foo_co (FooData* _data_)
                        g_object_unref (_data_->_async_result);
                        return FALSE;
                }
-               __finally1:
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-                       g_clear_error (&_data_->_inner_error0_);
-                       g_object_unref (_data_->_async_result);
-                       return FALSE;
-               }
-       }
-       __finally0:
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       _data_->_tmp0_ = g_new0 (gint, 3);
-       _data_->_tmp0_[0] = 1;
-       _data_->_tmp0_[1] = 2;
-       _data_->_tmp0_[2] = 3;
-       {
-               _data_->e_collection_length1 = 0;
-               _data_->_e_collection_size_ = 0;
-               _data_->e_collection = _data_->_tmp0_;
-               _data_->e_collection_length1 = 3;
-               for (_data_->e_it = 0; _data_->e_it < _data_->e_collection_length1; _data_->e_it = 
_data_->e_it + 1) {
-                       _data_->e = _data_->e_collection[_data_->e_it];
-                       {
-                       }
-               }
-               _data_->e_collection = (g_free (_data_->e_collection), NULL);
-       }
-       _data_->_tmp1_ = g_new0 (gint, 3);
-       _data_->_tmp1_[0] = 1;
-       _data_->_tmp1_[1] = 2;
-       _data_->_tmp1_[2] = 3;
-       {
-               _data_->_vala1_e_collection_length1 = 0;
-               _data_->__vala1_e_collection_size_ = 0;
-               _data_->_vala1_e_collection = _data_->_tmp1_;
-               _data_->_vala1_e_collection_length1 = 3;
-               for (_data_->_vala1_e_it = 0; _data_->_vala1_e_it < _data_->_vala1_e_collection_length1; 
_data_->_vala1_e_it = _data_->_vala1_e_it + 1) {
-                       _data_->_vala1_e = _data_->_vala1_e_collection[_data_->_vala1_e_it];
-                       {
-                       }
-               }
-               _data_->_vala1_e_collection = (g_free (_data_->_vala1_e_collection), NULL);
-       }
-       _data_->result = 0;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug597294.c-expected b/tests/asynchronous/bug597294.c-expected
index ee890d6fb..680ab4633 100644
--- a/tests/asynchronous/bug597294.c-expected
+++ b/tests/asynchronous/bug597294.c-expected
@@ -87,19 +87,21 @@ do_foo_co (DoFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->f (_data_->f_target);
-       (_data_->f_target_destroy_notify == NULL) ? NULL : (_data_->f_target_destroy_notify 
(_data_->f_target), NULL);
-       _data_->f = NULL;
-       _data_->f_target = NULL;
-       _data_->f_target_destroy_notify = NULL;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->f (_data_->f_target);
+               (_data_->f_target_destroy_notify == NULL) ? NULL : (_data_->f_target_destroy_notify 
(_data_->f_target), NULL);
+               _data_->f = NULL;
+               _data_->f_target = NULL;
+               _data_->f_target_destroy_notify = NULL;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug598677.c-expected b/tests/asynchronous/bug598677.c-expected
index 9724f6fcf..fec9423b0 100644
--- a/tests/asynchronous/bug598677.c-expected
+++ b/tests/asynchronous/bug598677.c-expected
@@ -338,22 +338,24 @@ do_foo_co (DoFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = foo_new (&_data_->_inner_error0_);
-       _data_->_tmp1_ = _data_->_tmp0_;
-       _foo_unref0 (_data_->_tmp1_);
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+       {
+               _data_->_tmp0_ = foo_new (&_data_->_inner_error0_);
+               _data_->_tmp1_ = _data_->_tmp0_;
+               _foo_unref0 (_data_->_tmp1_);
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
+               }
                g_object_unref (_data_->_async_result);
                return FALSE;
        }
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug598697.c-expected b/tests/asynchronous/bug598697.c-expected
index 028b443c1..8e9d80a3d 100644
--- a/tests/asynchronous/bug598697.c-expected
+++ b/tests/asynchronous/bug598697.c-expected
@@ -149,21 +149,23 @@ foo_do_foo_co (FooDoFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->f = ___lambda4__func;
-       _data_->f_target = foo_ref (_data_->self);
-       _data_->f_target_destroy_notify = foo_unref;
-       (_data_->f_target_destroy_notify == NULL) ? NULL : (_data_->f_target_destroy_notify 
(_data_->f_target), NULL);
-       _data_->f = NULL;
-       _data_->f_target = NULL;
-       _data_->f_target_destroy_notify = NULL;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->f = ___lambda4__func;
+               _data_->f_target = foo_ref (_data_->self);
+               _data_->f_target_destroy_notify = foo_unref;
+               (_data_->f_target_destroy_notify == NULL) ? NULL : (_data_->f_target_destroy_notify 
(_data_->f_target), NULL);
+               _data_->f = NULL;
+               _data_->f_target = NULL;
+               _data_->f_target_destroy_notify = NULL;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Foo*
diff --git a/tests/asynchronous/bug599568.c-expected b/tests/asynchronous/bug599568.c-expected
index 8ae3247b5..477a45d8f 100644
--- a/tests/asynchronous/bug599568.c-expected
+++ b/tests/asynchronous/bug599568.c-expected
@@ -74,34 +74,36 @@ do_foo_co (DoFooData* _data_)
        }
        _state_0:
        {
-               _data_->i = 0;
                {
-                       _data_->_tmp0_ = TRUE;
-                       while (TRUE) {
-                               if (!_data_->_tmp0_) {
-                                       _data_->_tmp1_ = _data_->i;
-                                       _data_->i = _data_->_tmp1_ + 1;
+                       _data_->i = 0;
+                       {
+                               _data_->_tmp0_ = TRUE;
+                               while (TRUE) {
+                                       if (!_data_->_tmp0_) {
+                                               _data_->_tmp1_ = _data_->i;
+                                               _data_->i = _data_->_tmp1_ + 1;
+                                       }
+                                       _data_->_tmp0_ = FALSE;
+                                       if (!(_data_->i < 2)) {
+                                               break;
+                                       }
+                                       memset (&_data_->_tmp2_, 0, sizeof (GValue));
+                                       g_value_init (&_data_->_tmp2_, G_TYPE_INT);
+                                       g_value_set_int (&_data_->_tmp2_, 42);
+                                       _data_->value = _data_->_tmp2_;
+                                       G_IS_VALUE (&_data_->value) ? (g_value_unset (&_data_->value), NULL) 
: NULL;
                                }
-                               _data_->_tmp0_ = FALSE;
-                               if (!(_data_->i < 2)) {
-                                       break;
-                               }
-                               memset (&_data_->_tmp2_, 0, sizeof (GValue));
-                               g_value_init (&_data_->_tmp2_, G_TYPE_INT);
-                               g_value_set_int (&_data_->_tmp2_, 42);
-                               _data_->value = _data_->_tmp2_;
-                               G_IS_VALUE (&_data_->value) ? (g_value_unset (&_data_->value), NULL) : NULL;
                        }
                }
-       }
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug600827.c-expected b/tests/asynchronous/bug600827.c-expected
index 3e94f402b..15832f3c8 100644
--- a/tests/asynchronous/bug600827.c-expected
+++ b/tests/asynchronous/bug600827.c-expected
@@ -135,14 +135,16 @@ foo_real_do_foo_co (FooDoFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
diff --git a/tests/asynchronous/bug601558.c-expected b/tests/asynchronous/bug601558.c-expected
index 081693d16..3d1db35e5 100644
--- a/tests/asynchronous/bug601558.c-expected
+++ b/tests/asynchronous/bug601558.c-expected
@@ -177,14 +177,16 @@ foo_real_do_foo_co (FooDoFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
@@ -483,19 +485,23 @@ bar_real_do_foo_co (BarDoFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       FOO_CLASS (bar_parent_class)->do_foo (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, TYPE_FOO, Foo), 
bar_do_foo_ready, _data_);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               FOO_CLASS (bar_parent_class)->do_foo (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, TYPE_FOO, 
Foo), bar_do_foo_ready, _data_);
+               return FALSE;
+       }
        _state_1:
-       FOO_CLASS (bar_parent_class)->do_foo_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, TYPE_FOO, 
Foo), _data_->_res_);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               FOO_CLASS (bar_parent_class)->do_foo_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, 
TYPE_FOO, Foo), _data_->_res_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Bar*
diff --git a/tests/asynchronous/bug602594.c-expected b/tests/asynchronous/bug602594.c-expected
index 0aabc315b..7717c5984 100644
--- a/tests/asynchronous/bug602594.c-expected
+++ b/tests/asynchronous/bug602594.c-expected
@@ -392,17 +392,19 @@ callback_co (CallbackData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _vala_assert (g_strcmp0 (_data_->s, "foo") == 0, "s == \"foo\"");
-       _vala_assert (_data_->b, "b");
-       success = TRUE;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _vala_assert (g_strcmp0 (_data_->s, "foo") == 0, "s == \"foo\"");
+               _vala_assert (_data_->b, "b");
+               success = TRUE;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug612641.c-expected b/tests/asynchronous/bug612641.c-expected
index 78565ef37..76f7b00a8 100644
--- a/tests/asynchronous/bug612641.c-expected
+++ b/tests/asynchronous/bug612641.c-expected
@@ -165,20 +165,22 @@ foo_foo_co (FooFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = ___lambda4__foo_func;
-       _data_->_tmp0__target = foo_ref (_data_->self);
-       _data_->_tmp0__target_destroy_notify = foo_unref;
-       _data_->result_target = _data_->_tmp0__target;
-       _data_->result_target_destroy_notify = _data_->_tmp0__target_destroy_notify;
-       _data_->result = _data_->_tmp0_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = ___lambda4__foo_func;
+               _data_->_tmp0__target = foo_ref (_data_->self);
+               _data_->_tmp0__target_destroy_notify = foo_unref;
+               _data_->result_target = _data_->_tmp0__target;
+               _data_->result_target_destroy_notify = _data_->_tmp0__target_destroy_notify;
+               _data_->result = _data_->_tmp0_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Foo*
diff --git a/tests/asynchronous/bug613484.c-expected b/tests/asynchronous/bug613484.c-expected
index 4ddf9a962..321e18926 100644
--- a/tests/asynchronous/bug613484.c-expected
+++ b/tests/asynchronous/bug613484.c-expected
@@ -147,14 +147,16 @@ do_foo_async_co (DoFooAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug614294.c-expected b/tests/asynchronous/bug614294.c-expected
index ba31c9f46..409967261 100644
--- a/tests/asynchronous/bug614294.c-expected
+++ b/tests/asynchronous/bug614294.c-expected
@@ -433,14 +433,16 @@ bar_real_foo_async_co (BarFooAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
@@ -593,14 +595,16 @@ sub_bar_real_foo_async_co (SubBarFooAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -794,14 +798,16 @@ baz_real_foo_async_co (BazFooAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -908,14 +914,16 @@ sub_baz_real_foo_async_co (SubBazFooAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -1033,87 +1041,97 @@ run_co (RunData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = bar_new ();
-       _data_->bar = _data_->_tmp0_;
-       _data_->_tmp1_ = _data_->bar;
-       bar_foo (_data_->_tmp1_, NULL);
-       _data_->_tmp2_ = _data_->bar;
-       _data_->_state_ = 1;
-       bar_foo_async (_data_->_tmp2_, run_ready, _data_);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               _data_->_tmp0_ = bar_new ();
+               _data_->bar = _data_->_tmp0_;
+               _data_->_tmp1_ = _data_->bar;
+               bar_foo (_data_->_tmp1_, NULL);
+               _data_->_tmp2_ = _data_->bar;
+               bar_foo_async (_data_->_tmp2_, run_ready, _data_);
+               return FALSE;
+       }
        _state_1:
-       bar_foo_finish (_data_->_tmp2_, _data_->_res_, NULL);
-       _data_->_tmp3_ = sub_bar_new ();
-       _data_->subbar = _data_->_tmp3_;
-       _data_->_tmp4_ = _data_->subbar;
-       bar_foo (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp4_, TYPE_BAR, Bar), NULL);
-       _data_->_tmp5_ = _data_->subbar;
-       _data_->_state_ = 2;
-       bar_foo_async (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp5_, TYPE_BAR, Bar), run_ready, _data_);
-       return FALSE;
+       {
+               _data_->_state_ = 2;
+               bar_foo_finish (_data_->_tmp2_, _data_->_res_, NULL);
+               _data_->_tmp3_ = sub_bar_new ();
+               _data_->subbar = _data_->_tmp3_;
+               _data_->_tmp4_ = _data_->subbar;
+               bar_foo (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp4_, TYPE_BAR, Bar), NULL);
+               _data_->_tmp5_ = _data_->subbar;
+               bar_foo_async (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp5_, TYPE_BAR, Bar), run_ready, _data_);
+               return FALSE;
+       }
        _state_2:
-       bar_foo_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp5_, TYPE_BAR, Bar), _data_->_res_, NULL);
-       _data_->_tmp6_ = baz_new ();
-       _data_->baz = _data_->_tmp6_;
-       _data_->_tmp7_ = _data_->baz;
-       afoo_foo (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp7_, TYPE_AFOO, AFoo), &_data_->_inner_error0_);
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->baz);
-               _g_object_unref0 (_data_->subbar);
-               _g_object_unref0 (_data_->bar);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
+       {
+               _data_->_state_ = 3;
+               bar_foo_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp5_, TYPE_BAR, Bar), _data_->_res_, 
NULL);
+               _data_->_tmp6_ = baz_new ();
+               _data_->baz = _data_->_tmp6_;
+               _data_->_tmp7_ = _data_->baz;
+               afoo_foo (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp7_, TYPE_AFOO, AFoo), 
&_data_->_inner_error0_);
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _g_object_unref0 (_data_->baz);
+                       _g_object_unref0 (_data_->subbar);
+                       _g_object_unref0 (_data_->bar);
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp8_ = _data_->bar;
+               bar_foo_async (_data_->_tmp8_, run_ready, _data_);
                return FALSE;
        }
-       _data_->_tmp8_ = _data_->bar;
-       _data_->_state_ = 3;
-       bar_foo_async (_data_->_tmp8_, run_ready, _data_);
-       return FALSE;
        _state_3:
-       bar_foo_finish (_data_->_tmp8_, _data_->_res_, NULL);
-       _data_->_tmp9_ = sub_baz_new ();
-       _data_->subbaz = _data_->_tmp9_;
-       _data_->_tmp10_ = _data_->subbaz;
-       afoo_foo (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp10_, TYPE_AFOO, AFoo), &_data_->_inner_error0_);
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->subbaz);
-               _g_object_unref0 (_data_->baz);
-               _g_object_unref0 (_data_->subbar);
-               _g_object_unref0 (_data_->bar);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
+       {
+               _data_->_state_ = 4;
+               bar_foo_finish (_data_->_tmp8_, _data_->_res_, NULL);
+               _data_->_tmp9_ = sub_baz_new ();
+               _data_->subbaz = _data_->_tmp9_;
+               _data_->_tmp10_ = _data_->subbaz;
+               afoo_foo (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp10_, TYPE_AFOO, AFoo), 
&_data_->_inner_error0_);
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _g_object_unref0 (_data_->subbaz);
+                       _g_object_unref0 (_data_->baz);
+                       _g_object_unref0 (_data_->subbar);
+                       _g_object_unref0 (_data_->bar);
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp11_ = _data_->subbaz;
+               afoo_foo_async (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp11_, TYPE_AFOO, AFoo), run_ready, 
_data_);
                return FALSE;
        }
-       _data_->_tmp11_ = _data_->subbaz;
-       _data_->_state_ = 4;
-       afoo_foo_async (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp11_, TYPE_AFOO, AFoo), run_ready, _data_);
-       return FALSE;
        _state_4:
-       afoo_foo_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp11_, TYPE_AFOO, AFoo), _data_->_res_, 
&_data_->_inner_error0_);
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+       {
+               afoo_foo_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp11_, TYPE_AFOO, AFoo), 
_data_->_res_, &_data_->_inner_error0_);
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _g_object_unref0 (_data_->subbaz);
+                       _g_object_unref0 (_data_->baz);
+                       _g_object_unref0 (_data_->subbar);
+                       _g_object_unref0 (_data_->bar);
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
                _g_object_unref0 (_data_->subbaz);
                _g_object_unref0 (_data_->baz);
                _g_object_unref0 (_data_->subbar);
                _g_object_unref0 (_data_->bar);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
+               }
                g_object_unref (_data_->_async_result);
                return FALSE;
        }
-       _g_object_unref0 (_data_->subbaz);
-       _g_object_unref0 (_data_->baz);
-       _g_object_unref0 (_data_->subbar);
-       _g_object_unref0 (_data_->bar);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug620740.c-expected b/tests/asynchronous/bug620740.c-expected
index e6a23ef23..5b7aa5e7e 100644
--- a/tests/asynchronous/bug620740.c-expected
+++ b/tests/asynchronous/bug620740.c-expected
@@ -117,17 +117,19 @@ do_foo_async_co (DoFooAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       memset (&_data_->_tmp0_, 0, sizeof (Foo));
-       memset (&_data_->_tmp0_, 0, sizeof (Foo));
-       _data_->result = _data_->_tmp0_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               memset (&_data_->_tmp0_, 0, sizeof (Foo));
+               memset (&_data_->_tmp0_, 0, sizeof (Foo));
+               _data_->result = _data_->_tmp0_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug626053.c-expected b/tests/asynchronous/bug626053.c-expected
index 6fa949ac1..d16cc5524 100644
--- a/tests/asynchronous/bug626053.c-expected
+++ b/tests/asynchronous/bug626053.c-expected
@@ -154,23 +154,25 @@ foo_foo_co (FooFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = g_strdup ("foo");
-       _data_->_tmp1_ = g_strdup ("bar");
-       _data_->_tmp2_ = g_new0 (gchar*, 2 + 1);
-       _data_->_tmp2_[0] = _data_->_tmp0_;
-       _data_->_tmp2_[1] = _data_->_tmp1_;
-       _data_->_tmp3_ = _data_->_tmp2_;
-       _data_->_tmp3__length1 = 2;
-       _data_->result_length1 = _data_->_tmp3__length1;
-       _data_->result = _data_->_tmp3_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = g_strdup ("foo");
+               _data_->_tmp1_ = g_strdup ("bar");
+               _data_->_tmp2_ = g_new0 (gchar*, 2 + 1);
+               _data_->_tmp2_[0] = _data_->_tmp0_;
+               _data_->_tmp2_[1] = _data_->_tmp1_;
+               _data_->_tmp3_ = _data_->_tmp2_;
+               _data_->_tmp3__length1 = 2;
+               _data_->result_length1 = _data_->_tmp3__length1;
+               _data_->result = _data_->_tmp3_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Foo*
diff --git a/tests/asynchronous/bug639591.c-expected b/tests/asynchronous/bug639591.c-expected
index ecc5ec297..8af32801e 100644
--- a/tests/asynchronous/bug639591.c-expected
+++ b/tests/asynchronous/bug639591.c-expected
@@ -133,40 +133,42 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_data1_ = g_slice_new0 (Block1Data);
-       _data_->_data1_->_ref_count_ = 1;
-       (_data_->_data1_->deleg_target_destroy_notify == NULL) ? NULL : 
(_data_->_data1_->deleg_target_destroy_notify (_data_->_data1_->deleg_target), NULL);
-       _data_->_data1_->deleg = NULL;
-       _data_->_data1_->deleg_target = NULL;
-       _data_->_data1_->deleg_target_destroy_notify = NULL;
-       _data_->_data1_->deleg = _data_->deleg;
-       _data_->_data1_->deleg_target = _data_->deleg_target;
-       _data_->_data1_->deleg_target_destroy_notify = _data_->deleg_target_destroy_notify;
-       _data_->_data1_->_async_data_ = _data_;
-       _data_->d = ___lambda4__deleg;
-       _data_->d_target = block1_data_ref (_data_->_data1_);
-       _data_->d_target_destroy_notify = block1_data_unref;
-       (_data_->d_target_destroy_notify == NULL) ? NULL : (_data_->d_target_destroy_notify 
(_data_->d_target), NULL);
-       _data_->d = NULL;
-       _data_->d_target = NULL;
-       _data_->d_target_destroy_notify = NULL;
-       _data_->d = NULL;
-       _data_->d_target = NULL;
-       _data_->d_target_destroy_notify = NULL;
-       (_data_->d_target_destroy_notify == NULL) ? NULL : (_data_->d_target_destroy_notify 
(_data_->d_target), NULL);
-       _data_->d = NULL;
-       _data_->d_target = NULL;
-       _data_->d_target_destroy_notify = NULL;
-       block1_data_unref (_data_->_data1_);
-       _data_->_data1_ = NULL;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_data1_ = g_slice_new0 (Block1Data);
+               _data_->_data1_->_ref_count_ = 1;
+               (_data_->_data1_->deleg_target_destroy_notify == NULL) ? NULL : 
(_data_->_data1_->deleg_target_destroy_notify (_data_->_data1_->deleg_target), NULL);
+               _data_->_data1_->deleg = NULL;
+               _data_->_data1_->deleg_target = NULL;
+               _data_->_data1_->deleg_target_destroy_notify = NULL;
+               _data_->_data1_->deleg = _data_->deleg;
+               _data_->_data1_->deleg_target = _data_->deleg_target;
+               _data_->_data1_->deleg_target_destroy_notify = _data_->deleg_target_destroy_notify;
+               _data_->_data1_->_async_data_ = _data_;
+               _data_->d = ___lambda4__deleg;
+               _data_->d_target = block1_data_ref (_data_->_data1_);
+               _data_->d_target_destroy_notify = block1_data_unref;
+               (_data_->d_target_destroy_notify == NULL) ? NULL : (_data_->d_target_destroy_notify 
(_data_->d_target), NULL);
+               _data_->d = NULL;
+               _data_->d_target = NULL;
+               _data_->d_target_destroy_notify = NULL;
+               _data_->d = NULL;
+               _data_->d_target = NULL;
+               _data_->d_target_destroy_notify = NULL;
+               (_data_->d_target_destroy_notify == NULL) ? NULL : (_data_->d_target_destroy_notify 
(_data_->d_target), NULL);
+               _data_->d = NULL;
+               _data_->d_target = NULL;
+               _data_->d_target_destroy_notify = NULL;
+               block1_data_unref (_data_->_data1_);
+               _data_->_data1_ = NULL;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug640721.c-expected b/tests/asynchronous/bug640721.c-expected
index 3a0427f28..83954eb9c 100644
--- a/tests/asynchronous/bug640721.c-expected
+++ b/tests/asynchronous/bug640721.c-expected
@@ -88,14 +88,16 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static Block1Data*
diff --git a/tests/asynchronous/bug641182.c-expected b/tests/asynchronous/bug641182.c-expected
index da0975cc4..7f2d67290 100644
--- a/tests/asynchronous/bug641182.c-expected
+++ b/tests/asynchronous/bug641182.c-expected
@@ -428,30 +428,32 @@ test_co (TestData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_data1_ = g_slice_new0 (Block1Data);
-       _data_->_data1_->_ref_count_ = 1;
-       _data_->_data1_->_async_data_ = _data_;
-       _data_->_tmp0_ = foo_new ();
-       _data_->foo = _data_->_tmp0_;
-       _data_->_data1_->i = 0;
-       foo_set_bar (_data_->foo, ___lambda4__bar, _data_->_data1_);
-       _data_->_tmp1_ = NULL;
-       _data_->_tmp1__target = NULL;
-       _data_->_tmp1_ = foo_get_bar (_data_->foo, &_data_->_tmp1__target);
-       _data_->_tmp2_ = _data_->_tmp1_;
-       _data_->_tmp2__target = _data_->_tmp1__target;
-       _data_->_tmp2_ (_data_->_tmp2__target);
-       _foo_unref0 (_data_->foo);
-       block1_data_unref (_data_->_data1_);
-       _data_->_data1_ = NULL;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_data1_ = g_slice_new0 (Block1Data);
+               _data_->_data1_->_ref_count_ = 1;
+               _data_->_data1_->_async_data_ = _data_;
+               _data_->_tmp0_ = foo_new ();
+               _data_->foo = _data_->_tmp0_;
+               _data_->_data1_->i = 0;
+               foo_set_bar (_data_->foo, ___lambda4__bar, _data_->_data1_);
+               _data_->_tmp1_ = NULL;
+               _data_->_tmp1__target = NULL;
+               _data_->_tmp1_ = foo_get_bar (_data_->foo, &_data_->_tmp1__target);
+               _data_->_tmp2_ = _data_->_tmp1_;
+               _data_->_tmp2__target = _data_->_tmp1__target;
+               _data_->_tmp2_ (_data_->_tmp2__target);
+               _foo_unref0 (_data_->foo);
+               block1_data_unref (_data_->_data1_);
+               _data_->_data1_ = NULL;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug646945.c-expected b/tests/asynchronous/bug646945.c-expected
index 8eb5f5b13..927eb3698 100644
--- a/tests/asynchronous/bug646945.c-expected
+++ b/tests/asynchronous/bug646945.c-expected
@@ -213,14 +213,16 @@ foo_real_method1_co (FooMethod1Data* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
@@ -338,14 +340,16 @@ bar_real_method2_co (BarMethod2Data* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
@@ -445,15 +449,17 @@ baz_real_method1_co (BazMethod1Data* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       baz_real_method1_co (_data_);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               baz_real_method1_co (_data_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -500,15 +506,17 @@ baz_real_method2_co (BazMethod2Data* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       baz_real_method2_co (_data_);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               baz_real_method2_co (_data_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Baz*
diff --git a/tests/asynchronous/bug652252.c-expected b/tests/asynchronous/bug652252.c-expected
index 09097dfb5..4a9eb61ff 100644
--- a/tests/asynchronous/bug652252.c-expected
+++ b/tests/asynchronous/bug652252.c-expected
@@ -150,14 +150,16 @@ foo_real_foo_co (FooFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
diff --git a/tests/asynchronous/bug653861.c-expected b/tests/asynchronous/bug653861.c-expected
index 380dfacdf..a3f09709c 100644
--- a/tests/asynchronous/bug653861.c-expected
+++ b/tests/asynchronous/bug653861.c-expected
@@ -161,15 +161,17 @@ foo_bar_co (FooBarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _vala_assert (_data_->g_type == _data_->t, "typeof (G) == t");
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _vala_assert (_data_->g_type == _data_->t, "typeof (G) == t");
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Foo*
diff --git a/tests/asynchronous/bug654336.c-expected b/tests/asynchronous/bug654336.c-expected
index 71a1e1a47..ab273075d 100644
--- a/tests/asynchronous/bug654336.c-expected
+++ b/tests/asynchronous/bug654336.c-expected
@@ -95,14 +95,16 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -155,19 +157,23 @@ bar_co (BarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       foo (G_TYPE_INT, NULL, NULL, bar_ready, _data_);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               foo (G_TYPE_INT, NULL, NULL, bar_ready, _data_);
+               return FALSE;
+       }
        _state_1:
-       foo_finish (_data_->_res_);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               foo_finish (_data_->_res_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug654337.c-expected b/tests/asynchronous/bug654337.c-expected
index 3237071f2..578cae1bb 100644
--- a/tests/asynchronous/bug654337.c-expected
+++ b/tests/asynchronous/bug654337.c-expected
@@ -141,29 +141,31 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_data1_ = g_slice_new0 (Block1Data);
-       _data_->_data1_->_ref_count_ = 1;
-       _data_->_data1_->t_type = _data_->t_type;
-       _data_->_data1_->t_dup_func = _data_->t_dup_func;
-       _data_->_data1_->t_destroy_func = _data_->t_destroy_func;
-       _data_->_data1_->_async_data_ = _data_;
-       _data_->c = ___lambda4__gsource_func;
-       _data_->c_target = block1_data_ref (_data_->_data1_);
-       _data_->c_target_destroy_notify = block1_data_unref;
-       (_data_->c_target_destroy_notify == NULL) ? NULL : (_data_->c_target_destroy_notify 
(_data_->c_target), NULL);
-       _data_->c = NULL;
-       _data_->c_target = NULL;
-       _data_->c_target_destroy_notify = NULL;
-       block1_data_unref (_data_->_data1_);
-       _data_->_data1_ = NULL;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_data1_ = g_slice_new0 (Block1Data);
+               _data_->_data1_->_ref_count_ = 1;
+               _data_->_data1_->t_type = _data_->t_type;
+               _data_->_data1_->t_dup_func = _data_->t_dup_func;
+               _data_->_data1_->t_destroy_func = _data_->t_destroy_func;
+               _data_->_data1_->_async_data_ = _data_;
+               _data_->c = ___lambda4__gsource_func;
+               _data_->c_target = block1_data_ref (_data_->_data1_);
+               _data_->c_target_destroy_notify = block1_data_unref;
+               (_data_->c_target_destroy_notify == NULL) ? NULL : (_data_->c_target_destroy_notify 
(_data_->c_target), NULL);
+               _data_->c = NULL;
+               _data_->c_target = NULL;
+               _data_->c_target_destroy_notify = NULL;
+               block1_data_unref (_data_->_data1_);
+               _data_->_data1_ = NULL;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug659886.c-expected b/tests/asynchronous/bug659886.c-expected
index 75de1ed66..91bf65630 100644
--- a/tests/asynchronous/bug659886.c-expected
+++ b/tests/asynchronous/bug659886.c-expected
@@ -128,15 +128,17 @@ foo_construct_co (FooNewData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->self = (Foo*) g_object_new (_data_->object_type, NULL);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->self = (Foo*) g_object_new (_data_->object_type, NULL);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
@@ -236,21 +238,25 @@ bar_co (BarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       foo_new (bar_ready, _data_);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               foo_new (bar_ready, _data_);
+               return FALSE;
+       }
        _state_1:
-       _data_->_tmp0_ = foo_new_finish (_data_->_res_);
-       _g_object_unref0 (f);
-       f = _data_->_tmp0_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = foo_new_finish (_data_->_res_);
+               _g_object_unref0 (f);
+               f = _data_->_tmp0_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug661961.c-expected b/tests/asynchronous/bug661961.c-expected
index c6f8da664..dcb504dc9 100644
--- a/tests/asynchronous/bug661961.c-expected
+++ b/tests/asynchronous/bug661961.c-expected
@@ -116,16 +116,18 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = ((_data_->bar != NULL) && (_data_->t_dup_func != NULL)) ? _data_->t_dup_func 
((gpointer) _data_->bar) : ((gpointer) _data_->bar);
-       _data_->result = _data_->_tmp0_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = ((_data_->bar != NULL) && (_data_->t_dup_func != NULL)) ? _data_->t_dup_func 
((gpointer) _data_->bar) : ((gpointer) _data_->bar);
+               _data_->result = _data_->_tmp0_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static Block1Data*
diff --git a/tests/asynchronous/bug710103.c-expected b/tests/asynchronous/bug710103.c-expected
index 0913a72b6..f717e0a92 100644
--- a/tests/asynchronous/bug710103.c-expected
+++ b/tests/asynchronous/bug710103.c-expected
@@ -272,15 +272,17 @@ foo_bar_co (FooBarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->self->manam = 23;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->self->manam = 23;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -326,16 +328,18 @@ foo_construct_async_co (FooNewAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->self = (Foo*) g_object_new (_data_->object_type, NULL);
-       _data_->self->manam = 42;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->self = (Foo*) g_object_new (_data_->object_type, NULL);
+               _data_->self->manam = 42;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
@@ -406,21 +410,25 @@ foo_create_foo_async_co (FooCreateFooAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       foo_new_async (foo_create_foo_async_ready, _data_);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               foo_new_async (foo_create_foo_async_ready, _data_);
+               return FALSE;
+       }
        _state_1:
-       _data_->_tmp0_ = foo_new_finish (_data_->_res_);
-       _data_->foo = _data_->_tmp0_;
-       _data_->result = _data_->foo;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = foo_new_finish (_data_->_res_);
+               _data_->foo = _data_->_tmp0_;
+               _data_->result = _data_->foo;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Foo*
diff --git a/tests/asynchronous/bug741929.c-expected b/tests/asynchronous/bug741929.c-expected
index 57ed28780..8b7e555e4 100644
--- a/tests/asynchronous/bug741929.c-expected
+++ b/tests/asynchronous/bug741929.c-expected
@@ -228,86 +228,94 @@ foo_query_async_co (FooQueryAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->self->priv->running = TRUE;
        {
-               _data_->_state_ = 1;
-               foo_internal_query_async (_data_->self, foo_query_async_ready, _data_);
-               return FALSE;
-               _state_1:
-               _data_->_tmp0_ = foo_internal_query_finish (_data_->self, _data_->_res_, 
&_data_->_inner_error0_);
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       goto __finally0;
-               }
-               if (!_data_->_tmp0_) {
+               _data_->self->priv->running = TRUE;
+               {
+                       _data_->_state_ = 1;
+                       foo_internal_query_async (_data_->self, foo_query_async_ready, _data_);
+                       return FALSE;
+                       _state_1:
                        {
-                               {
-                                       _data_->_state_ = 2;
-                                       foo_close_query_async (_data_->self, foo_query_async_ready, _data_);
-                                       return FALSE;
-                                       _state_2:
-                                       foo_close_query_finish (_data_->self, _data_->_res_, 
&_data_->_inner_error0_);
-                                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                                               goto __catch1_g_error;
+                               _data_->_tmp0_ = foo_internal_query_finish (_data_->self, _data_->_res_, 
&_data_->_inner_error0_);
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       goto __finally0;
+                               }
+                               if (!_data_->_tmp0_) {
+                                       {
+                                               {
+                                                       _data_->_state_ = 2;
+                                                       foo_close_query_async (_data_->self, 
foo_query_async_ready, _data_);
+                                                       return FALSE;
+                                                       _state_2:
+                                                       {
+                                                               foo_close_query_finish (_data_->self, 
_data_->_res_, &_data_->_inner_error0_);
+                                                               if (G_UNLIKELY (_data_->_inner_error0_ != 
NULL)) {
+                                                                       goto __catch1_g_error;
+                                                               }
+                                                       }
+                                                       goto __finally1;
+                                                       __catch1_g_error:
+                                                       {
+                                                               g_clear_error (&_data_->_inner_error0_);
+                                                       }
+                                                       __finally1:
+                                                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                                       }
+                                                       _data_->self->priv->running = FALSE;
+                                               }
+                                               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                                               if (_data_->_state_ != 0) {
+                                                       while (!g_task_get_completed (_data_->_async_result)) 
{
+                                                               g_main_context_iteration (g_task_get_context 
(_data_->_async_result), TRUE);
+                                                       }
+                                               }
+                                               g_object_unref (_data_->_async_result);
+                                               return FALSE;
                                        }
                                }
-                               goto __finally1;
-                               __catch1_g_error:
+                               __finally0:
                                {
-                                       g_clear_error (&_data_->_inner_error0_);
+                                       {
+                                               _data_->_state_ = 3;
+                                               foo_close_query_async (_data_->self, foo_query_async_ready, 
_data_);
+                                               return FALSE;
+                                       }
+                                       _state_3:
+                                       {
+                                               foo_close_query_finish (_data_->self, _data_->_res_, 
&_data_->_inner_error1_);
+                                               if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
+                                                       goto __catch2_g_error;
+                                               }
+                                       }
+                                       goto __finally2;
+                                       __catch2_g_error:
+                                       {
+                                               g_clear_error (&_data_->_inner_error1_);
+                                       }
+                                       __finally2:
+                                       if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
+                                               g_task_return_error (_data_->_async_result, 
_data_->_inner_error1_);
+                                               g_object_unref (_data_->_async_result);
+                                               return FALSE;
+                                       }
+                                       _data_->self->priv->running = FALSE;
                                }
-                               __finally1:
                                if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+                                       g_object_unref (_data_->_async_result);
+                                       return FALSE;
                                }
-                               _data_->self->priv->running = FALSE;
-                       }
-                       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-                       if (_data_->_state_ != 0) {
-                               while (!g_task_get_completed (_data_->_async_result)) {
-                                       g_main_context_iteration (g_task_get_context (_data_->_async_result), 
TRUE);
+                               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                               if (_data_->_state_ != 0) {
+                                       while (!g_task_get_completed (_data_->_async_result)) {
+                                               g_main_context_iteration (g_task_get_context 
(_data_->_async_result), TRUE);
+                                       }
                                }
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
                        }
-                       g_object_unref (_data_->_async_result);
-                       return FALSE;
-               }
-       }
-       __finally0:
-       {
-               {
-                       _data_->_state_ = 3;
-                       foo_close_query_async (_data_->self, foo_query_async_ready, _data_);
-                       return FALSE;
-                       _state_3:
-                       foo_close_query_finish (_data_->self, _data_->_res_, &_data_->_inner_error1_);
-                       if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
-                               goto __catch2_g_error;
-                       }
-               }
-               goto __finally2;
-               __catch2_g_error:
-               {
-                       g_clear_error (&_data_->_inner_error1_);
-               }
-               __finally2:
-               if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
-                       g_task_return_error (_data_->_async_result, _data_->_inner_error1_);
-                       g_object_unref (_data_->_async_result);
-                       return FALSE;
-               }
-               _data_->self->priv->running = FALSE;
-       }
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
                }
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -361,15 +369,17 @@ foo_internal_query_async_co (FooInternalQueryAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->result = TRUE;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->result = TRUE;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -419,14 +429,16 @@ foo_close_query_async_co (FooCloseQueryAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -526,42 +538,46 @@ go_async_co (GoAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = foo_new ();
-       _data_->foo = _data_->_tmp0_;
-       {
-               _data_->_state_ = 1;
-               foo_query_async (_data_->foo, go_async_ready, _data_);
-               return FALSE;
-               _state_1:
-               foo_query_finish (_data_->foo, _data_->_res_, &_data_->_inner_error0_);
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       goto __catch0_g_error;
-               }
-       }
-       goto __finally0;
-       __catch0_g_error:
        {
-               g_clear_error (&_data_->_inner_error0_);
-       }
-       __finally0:
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->foo);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       _data_->_tmp1_ = loop;
-       g_main_loop_quit (_data_->_tmp1_);
-       _g_object_unref0 (_data_->foo);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+               _data_->_tmp0_ = foo_new ();
+               _data_->foo = _data_->_tmp0_;
+               {
+                       _data_->_state_ = 1;
+                       foo_query_async (_data_->foo, go_async_ready, _data_);
+                       return FALSE;
+                       _state_1:
+                       {
+                               foo_query_finish (_data_->foo, _data_->_res_, &_data_->_inner_error0_);
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       goto __catch0_g_error;
+                               }
+                       }
+                       goto __finally0;
+                       __catch0_g_error:
+                       {
+                               g_clear_error (&_data_->_inner_error0_);
+                       }
+                       __finally0:
+                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                               _g_object_unref0 (_data_->foo);
+                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                               g_clear_error (&_data_->_inner_error0_);
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
+                       }
+                       _data_->_tmp1_ = loop;
+                       g_main_loop_quit (_data_->_tmp1_);
+                       _g_object_unref0 (_data_->foo);
+                       g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                       if (_data_->_state_ != 0) {
+                               while (!g_task_get_completed (_data_->_async_result)) {
+                                       g_main_context_iteration (g_task_get_context (_data_->_async_result), 
TRUE);
+                               }
+                       }
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
                }
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug742621.c-expected b/tests/asynchronous/bug742621.c-expected
index 093e6c43d..4f8cecb50 100644
--- a/tests/asynchronous/bug742621.c-expected
+++ b/tests/asynchronous/bug742621.c-expected
@@ -270,17 +270,19 @@ go_async_co (GoAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = xyzzy;
-       g_signal_parse_name ("notify::b", G_TYPE_OBJECT, &_data_->_tmp1_, &_data_->_tmp2_, TRUE);
-       g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, G_TYPE_OBJECT, 
GObject), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 
_data_->_tmp1_, _data_->_tmp2_, NULL, (GCallback) _on_b_g_object_notify, NULL);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = xyzzy;
+               g_signal_parse_name ("notify::b", G_TYPE_OBJECT, &_data_->_tmp1_, &_data_->_tmp2_, TRUE);
+               g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, 
G_TYPE_OBJECT, GObject), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | 
G_SIGNAL_MATCH_DATA, _data_->_tmp1_, _data_->_tmp2_, NULL, (GCallback) _on_b_g_object_notify, NULL);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug762819.c-expected b/tests/asynchronous/bug762819.c-expected
index ffb97eca0..562c6722b 100644
--- a/tests/asynchronous/bug762819.c-expected
+++ b/tests/asynchronous/bug762819.c-expected
@@ -255,20 +255,22 @@ foo_real_get_string_async_co (FooGetStringAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = g_strdup ("foo");
-       _data_->_tmp1_ = g_strdup ("bar");
-       _data_->_tmp2_ = g_new0 (gchar*, 2 + 1);
-       _data_->_tmp2_[0] = _data_->_tmp0_;
-       _data_->_tmp2_[1] = _data_->_tmp1_;
-       _data_->result = _data_->_tmp2_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = g_strdup ("foo");
+               _data_->_tmp1_ = g_strdup ("bar");
+               _data_->_tmp2_ = g_new0 (gchar*, 2 + 1);
+               _data_->_tmp2_[0] = _data_->_tmp0_;
+               _data_->_tmp2_[1] = _data_->_tmp1_;
+               _data_->result = _data_->_tmp2_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Foo*
diff --git a/tests/asynchronous/bug777242.c-expected b/tests/asynchronous/bug777242.c-expected
index 1bfa9d031..ed1c06461 100644
--- a/tests/asynchronous/bug777242.c-expected
+++ b/tests/asynchronous/bug777242.c-expected
@@ -86,27 +86,29 @@ run_co (RunData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       while (TRUE) {
-               if (i == 0) {
-                       _data_->_tmp0_ = g_strdup ("foo");
+       {
+               while (TRUE) {
+                       if (i == 0) {
+                               _data_->_tmp0_ = g_strdup ("foo");
+                               _g_free0 (_data_->foo);
+                               _data_->foo = _data_->_tmp0_;
+                               _data_->_tmp1_ = i;
+                               i = _data_->_tmp1_ + 1;
+                       } else {
+                               _g_free0 (_data_->foo);
+                               break;
+                       }
                        _g_free0 (_data_->foo);
-                       _data_->foo = _data_->_tmp0_;
-                       _data_->_tmp1_ = i;
-                       i = _data_->_tmp1_ + 1;
-               } else {
-                       _g_free0 (_data_->foo);
-                       break;
                }
-               _g_free0 (_data_->foo);
-       }
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static Block1Data*
diff --git a/tests/asynchronous/bug783543.c-expected b/tests/asynchronous/bug783543.c-expected
index 9d3542f63..27183193e 100644
--- a/tests/asynchronous/bug783543.c-expected
+++ b/tests/asynchronous/bug783543.c-expected
@@ -139,19 +139,23 @@ foo_bar_co (FooBarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _foo_bar_co_gsource_func, _data_, NULL);
-       _data_->_state_ = 1;
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _foo_bar_co_gsource_func, _data_, NULL);
+               return FALSE;
+       }
        _state_1:
-       ;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               ;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Foo*
diff --git a/tests/asynchronous/bug789249.c-expected b/tests/asynchronous/bug789249.c-expected
new file mode 100644
index 000000000..847638403
--- /dev/null
+++ b/tests/asynchronous/bug789249.c-expected
@@ -0,0 +1,114 @@
+/* asynchronous_bug789249.c generated by valac, the Vala compiler
+ * generated from asynchronous_bug789249.vala, do not modify */
+
+#include <glib.h>
+#include <gio/gio.h>
+
+#if !defined(VALA_EXTERN)
+#if defined(_MSC_VER)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
+typedef struct _FooData FooData;
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, 
__LINE__, G_STRFUNC, msg);
+#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, 
G_STRFUNC, msg); return; }
+#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning 
(G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
+#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, 
__LINE__, G_STRFUNC, msg);
+
+struct _FooData {
+       int _state_;
+       GObject* _source_object_;
+       GAsyncResult* _res_;
+       GTask* _async_result;
+       gint _tmp0_;
+};
+
+VALA_EXTERN gint counter;
+gint counter = 0;
+
+static void foo_data_free (gpointer _data);
+VALA_EXTERN void foo (GAsyncReadyCallback _callback_,
+          gpointer _user_data_);
+VALA_EXTERN void foo_finish (GAsyncResult* _res_);
+static gboolean foo_co (FooData* _data_);
+static void _vala_main (void);
+
+static void
+foo_data_free (gpointer _data)
+{
+       FooData* _data_;
+       _data_ = _data;
+       g_slice_free (FooData, _data_);
+}
+
+void
+foo (GAsyncReadyCallback _callback_,
+     gpointer _user_data_)
+{
+       FooData* _data_;
+       _data_ = g_slice_new0 (FooData);
+       _data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
+       g_task_set_task_data (_data_->_async_result, _data_, foo_data_free);
+       foo_co (_data_);
+}
+
+void
+foo_finish (GAsyncResult* _res_)
+{
+       FooData* _data_;
+       _data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
+}
+
+static gboolean
+foo_co (FooData* _data_)
+{
+       switch (_data_->_state_) {
+               case 0:
+               goto _state_0;
+               case 1:
+               goto _state_1;
+               default:
+               g_assert_not_reached ();
+       }
+       _state_0:
+       {
+               _data_->_state_ = 1;
+               _data_->_tmp0_ = counter;
+               counter = _data_->_tmp0_ + 1;
+               _vala_assert (counter <= 1, "counter <= 1");
+               foo_co (_data_);
+               return FALSE;
+       }
+       _state_1:
+       {
+               ;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
+               }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
+       }
+}
+
+static void
+_vala_main (void)
+{
+       foo (NULL, NULL);
+}
+
+int
+main (int argc,
+      char ** argv)
+{
+       _vala_main ();
+       return 0;
+}
+
diff --git a/tests/asynchronous/bug792660.c-expected b/tests/asynchronous/bug792660.c-expected
index 20c76608d..91afde95f 100644
--- a/tests/asynchronous/bug792660.c-expected
+++ b/tests/asynchronous/bug792660.c-expected
@@ -416,15 +416,17 @@ bar_real_foo_co (BarFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _vala_assert (_data_->i == 42, "i == 42");
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _vala_assert (_data_->i == 42, "i == 42");
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Bar*
diff --git a/tests/asynchronous/bug792942.c-expected b/tests/asynchronous/bug792942.c-expected
index 841d2cf0b..62fbba8fa 100644
--- a/tests/asynchronous/bug792942.c-expected
+++ b/tests/asynchronous/bug792942.c-expected
@@ -144,7 +144,6 @@ foo_construct_finish (GAsyncResult* _res_,
 static gboolean
 foo_construct_co (FooNewData* _data_)
 {
-       Foo* self = NULL;
        switch (_data_->_state_) {
                case 0:
                goto _state_0;
@@ -152,15 +151,18 @@ foo_construct_co (FooNewData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->self = (Foo*) g_type_create_instance (_data_->object_type);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               Foo* self = NULL;
+               _data_->self = (Foo*) g_type_create_instance (_data_->object_type);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
@@ -427,37 +429,41 @@ run_co (RunData* _data_)
        }
        _state_0:
        {
-               _data_->_state_ = 1;
-               foo_new (run_ready, _data_);
-               return FALSE;
-               _state_1:
-               _data_->_tmp0_ = foo_new_finish (_data_->_res_, &_data_->_inner_error0_);
-               _data_->foo = _data_->_tmp0_;
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       goto __catch0_g_error;
-               }
-               _foo_unref0 (_data_->foo);
-       }
-       goto __finally0;
-       __catch0_g_error:
-       {
-               g_clear_error (&_data_->_inner_error0_);
-       }
-       __finally0:
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+               {
+                       _data_->_state_ = 1;
+                       foo_new (run_ready, _data_);
+                       return FALSE;
+                       _state_1:
+                       {
+                               _data_->_tmp0_ = foo_new_finish (_data_->_res_, &_data_->_inner_error0_);
+                               _data_->foo = _data_->_tmp0_;
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       goto __catch0_g_error;
+                               }
+                               _foo_unref0 (_data_->foo);
+                       }
+                       goto __finally0;
+                       __catch0_g_error:
+                       {
+                               g_clear_error (&_data_->_inner_error0_);
+                       }
+                       __finally0:
+                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                               g_clear_error (&_data_->_inner_error0_);
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
+                       }
+                       g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                       if (_data_->_state_ != 0) {
+                               while (!g_task_get_completed (_data_->_async_result)) {
+                                       g_main_context_iteration (g_task_get_context (_data_->_async_result), 
TRUE);
+                               }
+                       }
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
                }
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/bug793158.c-expected b/tests/asynchronous/bug793158.c-expected
index 218575392..aa8ffb78b 100644
--- a/tests/asynchronous/bug793158.c-expected
+++ b/tests/asynchronous/bug793158.c-expected
@@ -144,15 +144,17 @@ foo_bar_co (FooBarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->result = TRUE;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->result = TRUE;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Foo*
diff --git a/tests/asynchronous/captured-fixed-array.c-expected 
b/tests/asynchronous/captured-fixed-array.c-expected
index 8f153f064..e4814e247 100644
--- a/tests/asynchronous/captured-fixed-array.c-expected
+++ b/tests/asynchronous/captured-fixed-array.c-expected
@@ -79,24 +79,26 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       memset (&_data_->_tmp0_, 0, 2 * sizeof (gint));
-       _data_->_tmp0_[0] = 23;
-       _data_->_tmp0_[1] = 42;
-       memcpy (_data_->array, _data_->_tmp0_, 2 * sizeof (gint));
-       _vala_assert (2 == 2, "array.length == 2");
-       _data_->_tmp1_ = _data_->array[1];
-       _vala_assert (_data_->_tmp1_ == 42, "array[1] == 42");
-       _vala_assert (3 == 3, "array_param.length == 3");
-       _data_->_tmp2_ = _data_->array_param[2];
-       _vala_assert (_data_->_tmp2_ == 4711, "array_param[2] == 4711");
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               memset (&_data_->_tmp0_, 0, 2 * sizeof (gint));
+               _data_->_tmp0_[0] = 23;
+               _data_->_tmp0_[1] = 42;
+               memcpy (_data_->array, _data_->_tmp0_, 2 * sizeof (gint));
+               _vala_assert (2 == 2, "array.length == 2");
+               _data_->_tmp1_ = _data_->array[1];
+               _vala_assert (_data_->_tmp1_ == 42, "array[1] == 42");
+               _vala_assert (3 == 3, "array_param.length == 3");
+               _data_->_tmp2_ = _data_->array_param[2];
+               _vala_assert (_data_->_tmp2_ == 4711, "array_param[2] == 4711");
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/catch-error-scope.c-expected b/tests/asynchronous/catch-error-scope.c-expected
index 289b79029..37fda5411 100644
--- a/tests/asynchronous/catch-error-scope.c-expected
+++ b/tests/asynchronous/catch-error-scope.c-expected
@@ -108,57 +108,59 @@ foo_co (FooData* _data_)
        }
        _state_0:
        {
-               _data_->_tmp0_ = g_error_new_literal (FOO_ERROR, FOO_ERROR_FAIL, "Foo");
-               _data_->_inner_error0_ = _data_->_tmp0_;
-               goto __catch0_g_error;
-       }
-       goto __finally0;
-       __catch0_g_error:
-       {
-               _data_->e = _data_->_inner_error0_;
-               _data_->_inner_error0_ = NULL;
-               _vala_assert (_data_->e->domain == FOO_ERROR, "e is FooError");
-               _data_->_tmp1_ = _data_->e->message;
-               _vala_assert (g_strcmp0 (_data_->_tmp1_, "Foo") == 0, "e.message == \"Foo\"");
-               _g_error_free0 (_data_->e);
-       }
-       __finally0:
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       {
-               _data_->_tmp2_ = g_error_new_literal (FOO_ERROR, FOO_ERROR_FAIL, "Bar");
-               _data_->_inner_error0_ = _data_->_tmp2_;
-               goto __catch1_g_error;
-       }
-       goto __finally1;
-       __catch1_g_error:
-       {
-               _data_->_vala1_e = _data_->_inner_error0_;
-               _data_->_inner_error0_ = NULL;
-               _vala_assert (_data_->_vala1_e->domain == FOO_ERROR, "e is FooError");
-               _data_->_tmp3_ = _data_->_vala1_e->message;
-               _vala_assert (g_strcmp0 (_data_->_tmp3_, "Bar") == 0, "e.message == \"Bar\"");
-               _g_error_free0 (_data_->_vala1_e);
-       }
-       __finally1:
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
+               {
+                       _data_->_tmp0_ = g_error_new_literal (FOO_ERROR, FOO_ERROR_FAIL, "Foo");
+                       _data_->_inner_error0_ = _data_->_tmp0_;
+                       goto __catch0_g_error;
+               }
+               goto __finally0;
+               __catch0_g_error:
+               {
+                       _data_->e = _data_->_inner_error0_;
+                       _data_->_inner_error0_ = NULL;
+                       _vala_assert (_data_->e->domain == FOO_ERROR, "e is FooError");
+                       _data_->_tmp1_ = _data_->e->message;
+                       _vala_assert (g_strcmp0 (_data_->_tmp1_, "Foo") == 0, "e.message == \"Foo\"");
+                       _g_error_free0 (_data_->e);
+               }
+               __finally0:
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               {
+                       _data_->_tmp2_ = g_error_new_literal (FOO_ERROR, FOO_ERROR_FAIL, "Bar");
+                       _data_->_inner_error0_ = _data_->_tmp2_;
+                       goto __catch1_g_error;
+               }
+               goto __finally1;
+               __catch1_g_error:
+               {
+                       _data_->_vala1_e = _data_->_inner_error0_;
+                       _data_->_inner_error0_ = NULL;
+                       _vala_assert (_data_->_vala1_e->domain == FOO_ERROR, "e is FooError");
+                       _data_->_tmp3_ = _data_->_vala1_e->message;
+                       _vala_assert (g_strcmp0 (_data_->_tmp3_, "Bar") == 0, "e.message == \"Bar\"");
+                       _g_error_free0 (_data_->_vala1_e);
+               }
+               __finally1:
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
+               }
                g_object_unref (_data_->_async_result);
                return FALSE;
        }
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static Block1Data*
diff --git a/tests/asynchronous/catch-in-finally.c-expected b/tests/asynchronous/catch-in-finally.c-expected
index 9779a393a..f37b79f3a 100644
--- a/tests/asynchronous/catch-in-finally.c-expected
+++ b/tests/asynchronous/catch-in-finally.c-expected
@@ -171,26 +171,28 @@ fail_co (FailData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = g_error_new_literal (FOO_ERROR, FOO_ERROR_FAIL, "fail");
-       _data_->_inner_error0_ = _data_->_tmp0_;
-       if (_data_->_inner_error0_->domain == FOO_ERROR) {
-               g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       } else {
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
+       {
+               _data_->_tmp0_ = g_error_new_literal (FOO_ERROR, FOO_ERROR_FAIL, "fail");
+               _data_->_inner_error0_ = _data_->_tmp0_;
+               if (_data_->_inner_error0_->domain == FOO_ERROR) {
+                       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               } else {
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
+               }
                g_object_unref (_data_->_async_result);
                return FALSE;
        }
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -233,14 +235,16 @@ may_fail_co (MayFailData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -299,71 +303,77 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       {
-               _data_->_state_ = 1;
-               fail (foo_ready, _data_);
-               return FALSE;
-               _state_1:
-               fail_finish (_data_->_res_, &_data_->_inner_error0_);
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       goto __finally0;
-               }
-       }
-       __finally0:
        {
                {
-                       _data_->_state_ = 2;
-                       may_fail (foo_ready, _data_);
+                       _data_->_state_ = 1;
+                       fail (foo_ready, _data_);
                        return FALSE;
-                       _state_2:
-                       may_fail_finish (_data_->_res_, &_data_->_inner_error1_);
-                       if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
-                               if (_data_->_inner_error1_->domain == FOO_ERROR) {
-                                       goto __catch1_foo_error;
+                       _state_1:
+                       {
+                               fail_finish (_data_->_res_, &_data_->_inner_error0_);
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       goto __finally0;
+                               }
+                       }
+                       __finally0:
+                       {
+                               {
+                                       _data_->_state_ = 2;
+                                       may_fail (foo_ready, _data_);
+                                       return FALSE;
+                               }
+                               _state_2:
+                               {
+                                       may_fail_finish (_data_->_res_, &_data_->_inner_error1_);
+                                       if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
+                                               if (_data_->_inner_error1_->domain == FOO_ERROR) {
+                                                       goto __catch1_foo_error;
+                                               }
+                                       }
+                               }
+                               goto __finally1;
+                               __catch1_foo_error:
+                               {
+                                       g_clear_error (&_data_->_inner_error1_);
+                                       g_assert_not_reached ();
+                               }
+                               __finally1:
+                               if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
+                                       if (_data_->_inner_error1_->domain == FOO_ERROR) {
+                                               g_task_return_error (_data_->_async_result, 
_data_->_inner_error1_);
+                                               g_object_unref (_data_->_async_result);
+                                               return FALSE;
+                                       } else {
+                                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", 
__FILE__, __LINE__, _data_->_inner_error1_->message, g_quark_to_string (_data_->_inner_error1_->domain), 
_data_->_inner_error1_->code);
+                                               g_clear_error (&_data_->_inner_error1_);
+                                               g_object_unref (_data_->_async_result);
+                                               return FALSE;
+                                       }
+                               }
+                       }
+                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                               if (_data_->_inner_error0_->domain == FOO_ERROR) {
+                                       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+                                       g_object_unref (_data_->_async_result);
+                                       return FALSE;
+                               } else {
+                                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", 
__FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                                       g_clear_error (&_data_->_inner_error0_);
+                                       g_object_unref (_data_->_async_result);
+                                       return FALSE;
                                }
                        }
-               }
-               goto __finally1;
-               __catch1_foo_error:
-               {
-                       g_clear_error (&_data_->_inner_error1_);
                        g_assert_not_reached ();
-               }
-               __finally1:
-               if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
-                       if (_data_->_inner_error1_->domain == FOO_ERROR) {
-                               g_task_return_error (_data_->_async_result, _data_->_inner_error1_);
-                               g_object_unref (_data_->_async_result);
-                               return FALSE;
-                       } else {
-                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error1_->message, g_quark_to_string (_data_->_inner_error1_->domain), 
_data_->_inner_error1_->code);
-                               g_clear_error (&_data_->_inner_error1_);
-                               g_object_unref (_data_->_async_result);
-                               return FALSE;
+                       g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                       if (_data_->_state_ != 0) {
+                               while (!g_task_get_completed (_data_->_async_result)) {
+                                       g_main_context_iteration (g_task_get_context (_data_->_async_result), 
TRUE);
+                               }
                        }
-               }
-       }
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               if (_data_->_inner_error0_->domain == FOO_ERROR) {
-                       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
-                       g_object_unref (_data_->_async_result);
-                       return FALSE;
-               } else {
-                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-                       g_clear_error (&_data_->_inner_error0_);
                        g_object_unref (_data_->_async_result);
                        return FALSE;
                }
        }
-       g_assert_not_reached ();
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -426,126 +436,136 @@ bar_co (BarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       {
-               _data_->_state_ = 1;
-               may_fail (bar_ready, _data_);
-               return FALSE;
-               _state_1:
-               may_fail_finish (_data_->_res_, &_data_->_inner_error0_);
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       goto __finally0;
-               }
-       }
-       __finally0:
        {
                {
-                       _data_->_state_ = 2;
-                       fail (bar_ready, _data_);
+                       _data_->_state_ = 1;
+                       may_fail (bar_ready, _data_);
                        return FALSE;
-                       _state_2:
-                       fail_finish (_data_->_res_, &_data_->_inner_error1_);
-                       if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
-                               if (_data_->_inner_error1_->domain == FOO_ERROR) {
-                                       goto __catch1_foo_error;
+                       _state_1:
+                       {
+                               may_fail_finish (_data_->_res_, &_data_->_inner_error0_);
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       goto __finally0;
                                }
                        }
-               }
-               goto __finally1;
-               __catch1_foo_error:
-               {
-                       g_clear_error (&_data_->_inner_error1_);
-               }
-               __finally1:
-               if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
-                       if (_data_->_inner_error1_->domain == FOO_ERROR) {
-                               g_task_return_error (_data_->_async_result, _data_->_inner_error1_);
-                               g_object_unref (_data_->_async_result);
-                               return FALSE;
-                       } else {
-                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error1_->message, g_quark_to_string (_data_->_inner_error1_->domain), 
_data_->_inner_error1_->code);
-                               g_clear_error (&_data_->_inner_error1_);
-                               g_object_unref (_data_->_async_result);
+                       __finally0:
+                       {
+                               {
+                                       _data_->_state_ = 2;
+                                       fail (bar_ready, _data_);
+                                       return FALSE;
+                               }
+                               _state_2:
+                               {
+                                       fail_finish (_data_->_res_, &_data_->_inner_error1_);
+                                       if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
+                                               if (_data_->_inner_error1_->domain == FOO_ERROR) {
+                                                       goto __catch1_foo_error;
+                                               }
+                                       }
+                               }
+                               goto __finally1;
+                               __catch1_foo_error:
+                               {
+                                       g_clear_error (&_data_->_inner_error1_);
+                               }
+                               __finally1:
+                               if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
+                                       if (_data_->_inner_error1_->domain == FOO_ERROR) {
+                                               g_task_return_error (_data_->_async_result, 
_data_->_inner_error1_);
+                                               g_object_unref (_data_->_async_result);
+                                               return FALSE;
+                                       } else {
+                                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", 
__FILE__, __LINE__, _data_->_inner_error1_->message, g_quark_to_string (_data_->_inner_error1_->domain), 
_data_->_inner_error1_->code);
+                                               g_clear_error (&_data_->_inner_error1_);
+                                               g_object_unref (_data_->_async_result);
+                                               return FALSE;
+                                       }
+                               }
+                       }
+                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                               if (_data_->_inner_error0_->domain == FOO_ERROR) {
+                                       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+                                       g_object_unref (_data_->_async_result);
+                                       return FALSE;
+                               } else {
+                                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", 
__FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                                       g_clear_error (&_data_->_inner_error0_);
+                                       g_object_unref (_data_->_async_result);
+                                       return FALSE;
+                               }
+                       }
+                       {
+                               _data_->_state_ = 3;
+                               fail (bar_ready, _data_);
                                return FALSE;
                        }
-               }
-       }
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               if (_data_->_inner_error0_->domain == FOO_ERROR) {
-                       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
-                       g_object_unref (_data_->_async_result);
-                       return FALSE;
-               } else {
-                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-                       g_clear_error (&_data_->_inner_error0_);
-                       g_object_unref (_data_->_async_result);
-                       return FALSE;
-               }
-       }
-       {
-               _data_->_state_ = 3;
-               fail (bar_ready, _data_);
-               return FALSE;
-               _state_3:
-               fail_finish (_data_->_res_, &_data_->_inner_error0_);
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       goto __finally2;
-               }
-       }
-       __finally2:
-       {
-               {
-                       _data_->_state_ = 4;
-                       may_fail (bar_ready, _data_);
-                       return FALSE;
-                       _state_4:
-                       may_fail_finish (_data_->_res_, &_data_->_inner_error1_);
-                       if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
-                               if (_data_->_inner_error1_->domain == FOO_ERROR) {
-                                       goto __catch3_foo_error;
+                       _state_3:
+                       {
+                               fail_finish (_data_->_res_, &_data_->_inner_error0_);
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       goto __finally2;
+                               }
+                       }
+                       __finally2:
+                       {
+                               {
+                                       _data_->_state_ = 4;
+                                       may_fail (bar_ready, _data_);
+                                       return FALSE;
+                               }
+                               _state_4:
+                               {
+                                       may_fail_finish (_data_->_res_, &_data_->_inner_error1_);
+                                       if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
+                                               if (_data_->_inner_error1_->domain == FOO_ERROR) {
+                                                       goto __catch3_foo_error;
+                                               }
+                                       }
+                               }
+                               goto __finally3;
+                               __catch3_foo_error:
+                               {
+                                       g_clear_error (&_data_->_inner_error1_);
+                                       g_assert_not_reached ();
+                               }
+                               __finally3:
+                               if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
+                                       if (_data_->_inner_error1_->domain == FOO_ERROR) {
+                                               g_task_return_error (_data_->_async_result, 
_data_->_inner_error1_);
+                                               g_object_unref (_data_->_async_result);
+                                               return FALSE;
+                                       } else {
+                                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", 
__FILE__, __LINE__, _data_->_inner_error1_->message, g_quark_to_string (_data_->_inner_error1_->domain), 
_data_->_inner_error1_->code);
+                                               g_clear_error (&_data_->_inner_error1_);
+                                               g_object_unref (_data_->_async_result);
+                                               return FALSE;
+                                       }
+                               }
+                       }
+                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                               if (_data_->_inner_error0_->domain == FOO_ERROR) {
+                                       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+                                       g_object_unref (_data_->_async_result);
+                                       return FALSE;
+                               } else {
+                                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", 
__FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                                       g_clear_error (&_data_->_inner_error0_);
+                                       g_object_unref (_data_->_async_result);
+                                       return FALSE;
                                }
                        }
-               }
-               goto __finally3;
-               __catch3_foo_error:
-               {
-                       g_clear_error (&_data_->_inner_error1_);
                        g_assert_not_reached ();
-               }
-               __finally3:
-               if (G_UNLIKELY (_data_->_inner_error1_ != NULL)) {
-                       if (_data_->_inner_error1_->domain == FOO_ERROR) {
-                               g_task_return_error (_data_->_async_result, _data_->_inner_error1_);
-                               g_object_unref (_data_->_async_result);
-                               return FALSE;
-                       } else {
-                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error1_->message, g_quark_to_string (_data_->_inner_error1_->domain), 
_data_->_inner_error1_->code);
-                               g_clear_error (&_data_->_inner_error1_);
-                               g_object_unref (_data_->_async_result);
-                               return FALSE;
+                       g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                       if (_data_->_state_ != 0) {
+                               while (!g_task_get_completed (_data_->_async_result)) {
+                                       g_main_context_iteration (g_task_get_context (_data_->_async_result), 
TRUE);
+                               }
                        }
-               }
-       }
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               if (_data_->_inner_error0_->domain == FOO_ERROR) {
-                       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
-                       g_object_unref (_data_->_async_result);
-                       return FALSE;
-               } else {
-                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-                       g_clear_error (&_data_->_inner_error0_);
                        g_object_unref (_data_->_async_result);
                        return FALSE;
                }
        }
-       g_assert_not_reached ();
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -681,16 +701,18 @@ run_co (RunData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       foo (___lambda4__gasync_ready_callback, NULL);
-       bar (___lambda5__gasync_ready_callback, NULL);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               foo (___lambda4__gasync_ready_callback, NULL);
+               bar (___lambda5__gasync_ready_callback, NULL);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/closures.c-expected b/tests/asynchronous/closures.c-expected
index 9c2d0f92c..bdceba48e 100644
--- a/tests/asynchronous/closures.c-expected
+++ b/tests/asynchronous/closures.c-expected
@@ -153,41 +153,45 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_data1_ = g_slice_new0 (Block1Data);
-       _data_->_data1_->_ref_count_ = 1;
-       _g_free0 (_data_->_data1_->baz);
-       _data_->_data1_->baz = _data_->baz;
-       _data_->_data1_->_async_data_ = _data_;
-       _data_->_data1_->func = NULL;
-       _data_->_data1_->func_target = NULL;
-       _data_->_tmp0_ = g_strdup ("hello");
-       _data_->_data1_->bar = _data_->_tmp0_;
-       _data_->foobar = ___lambda4__func;
-       _data_->foobar_target = block1_data_ref (_data_->_data1_);
-       _data_->foobar_target_destroy_notify = block1_data_unref;
-       _data_->foobar (_data_->foobar_target);
-       _vala_assert (g_strcmp0 (_data_->_data1_->bar, "world") == 0, "bar == \"world\"");
-       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _foo_co_gsource_func, _data_, NULL);
-       _data_->_state_ = 1;
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               _data_->_data1_ = g_slice_new0 (Block1Data);
+               _data_->_data1_->_ref_count_ = 1;
+               _g_free0 (_data_->_data1_->baz);
+               _data_->_data1_->baz = _data_->baz;
+               _data_->_data1_->_async_data_ = _data_;
+               _data_->_data1_->func = NULL;
+               _data_->_data1_->func_target = NULL;
+               _data_->_tmp0_ = g_strdup ("hello");
+               _data_->_data1_->bar = _data_->_tmp0_;
+               _data_->foobar = ___lambda4__func;
+               _data_->foobar_target = block1_data_ref (_data_->_data1_);
+               _data_->foobar_target_destroy_notify = block1_data_unref;
+               _data_->foobar (_data_->foobar_target);
+               _vala_assert (g_strcmp0 (_data_->_data1_->bar, "world") == 0, "bar == \"world\"");
+               g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _foo_co_gsource_func, _data_, NULL);
+               return FALSE;
+       }
        _state_1:
-       ;
-       _data_->_tmp1_ = main_loop;
-       g_main_loop_quit (_data_->_tmp1_);
-       (_data_->foobar_target_destroy_notify == NULL) ? NULL : (_data_->foobar_target_destroy_notify 
(_data_->foobar_target), NULL);
-       _data_->foobar = NULL;
-       _data_->foobar_target = NULL;
-       _data_->foobar_target_destroy_notify = NULL;
-       block1_data_unref (_data_->_data1_);
-       _data_->_data1_ = NULL;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               ;
+               _data_->_tmp1_ = main_loop;
+               g_main_loop_quit (_data_->_tmp1_);
+               (_data_->foobar_target_destroy_notify == NULL) ? NULL : (_data_->foobar_target_destroy_notify 
(_data_->foobar_target), NULL);
+               _data_->foobar = NULL;
+               _data_->foobar_target = NULL;
+               _data_->foobar_target_destroy_notify = NULL;
+               block1_data_unref (_data_->_data1_);
+               _data_->_data1_ = NULL;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/constructor-argument-check.c-expected 
b/tests/asynchronous/constructor-argument-check.c-expected
index 76d364bb0..f6ea8e0ff 100644
--- a/tests/asynchronous/constructor-argument-check.c-expected
+++ b/tests/asynchronous/constructor-argument-check.c-expected
@@ -154,7 +154,6 @@ foo_construct_finish (GAsyncResult* _res_)
 static gboolean
 foo_construct_co (FooNewData* _data_)
 {
-       Foo* self = NULL;
        switch (_data_->_state_) {
                case 0:
                goto _state_0;
@@ -162,16 +161,19 @@ foo_construct_co (FooNewData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->self = (Foo*) g_type_create_instance (_data_->object_type);
-       _vala_assert (g_strcmp0 (_data_->bar, "foo") == 0, "bar == \"foo\"");
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               Foo* self = NULL;
+               _data_->self = (Foo*) g_type_create_instance (_data_->object_type);
+               _vala_assert (g_strcmp0 (_data_->bar, "foo") == 0, "bar == \"foo\"");
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
@@ -437,21 +439,25 @@ run_co (RunData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       foo_new ("foo", run_ready, _data_);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               foo_new ("foo", run_ready, _data_);
+               return FALSE;
+       }
        _state_1:
-       _data_->_tmp0_ = foo_new_finish (_data_->_res_);
-       _data_->_tmp1_ = _data_->_tmp0_;
-       _foo_unref0 (_data_->_tmp1_);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = foo_new_finish (_data_->_res_);
+               _data_->_tmp1_ = _data_->_tmp0_;
+               _foo_unref0 (_data_->_tmp1_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/finish-name.c-expected b/tests/asynchronous/finish-name.c-expected
index e12dcc9b9..713c54147 100644
--- a/tests/asynchronous/finish-name.c-expected
+++ b/tests/asynchronous/finish-name.c-expected
@@ -261,7 +261,6 @@ foo_construct_finish (GAsyncResult* _res_)
 static gboolean
 foo_construct_async_co (FooNewAsyncData* _data_)
 {
-       Foo* self = NULL;
        switch (_data_->_state_) {
                case 0:
                goto _state_0;
@@ -269,15 +268,18 @@ foo_construct_async_co (FooNewAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->self = (Foo*) g_type_create_instance (_data_->object_type);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               Foo* self = NULL;
+               _data_->self = (Foo*) g_type_create_instance (_data_->object_type);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
@@ -347,16 +349,18 @@ foo_bar_co (FooBarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = g_strdup ("bar");
-       _data_->result = _data_->_tmp0_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = g_strdup ("bar");
+               _data_->result = _data_->_tmp0_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -406,16 +410,18 @@ foo_real_baz_co (FooBazData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = g_strdup ("baz");
-       _data_->result = _data_->_tmp0_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = g_strdup ("baz");
+               _data_->result = _data_->_tmp0_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
@@ -706,16 +712,18 @@ bar_real_baz_co (BarBazData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = g_strdup ("baz_bar");
-       _data_->result = _data_->_tmp0_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = g_strdup ("baz_bar");
+               _data_->result = _data_->_tmp0_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Bar*
@@ -809,16 +817,18 @@ manam_co (ManamData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = g_strdup ("manam");
-       _data_->result = _data_->_tmp0_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = g_strdup ("manam");
+               _data_->result = _data_->_tmp0_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static Block1Data*
diff --git a/tests/asynchronous/generator.c-expected b/tests/asynchronous/generator.c-expected
index 56db316e6..0f296c34e 100644
--- a/tests/asynchronous/generator.c-expected
+++ b/tests/asynchronous/generator.c-expected
@@ -269,20 +269,24 @@ generator_helper_co (GeneratorHelperData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       generator_generate (_data_->self, generator_helper_ready, _data_);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               generator_generate (_data_->self, generator_helper_ready, _data_);
+               return FALSE;
+       }
        _state_1:
-       generator_generate_finish (_data_->self, _data_->_res_);
-       _data_->self->priv->consumed = TRUE;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               generator_generate_finish (_data_->self, _data_->_res_);
+               _data_->self->priv->consumed = TRUE;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
@@ -367,26 +371,30 @@ generator_feed_co (GeneratorFeedData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->self->priv->value = _data_->value;
-       (_data_->self->priv->callback_target_destroy_notify == NULL) ? NULL : 
(_data_->self->priv->callback_target_destroy_notify (_data_->self->priv->callback_target), NULL);
-       _data_->self->priv->callback = NULL;
-       _data_->self->priv->callback_target = NULL;
-       _data_->self->priv->callback_target_destroy_notify = NULL;
-       _data_->self->priv->callback = _generator_feed_co_gsource_func;
-       _data_->self->priv->callback_target = _data_;
-       _data_->self->priv->callback_target_destroy_notify = NULL;
-       _data_->_state_ = 1;
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               _data_->self->priv->value = _data_->value;
+               (_data_->self->priv->callback_target_destroy_notify == NULL) ? NULL : 
(_data_->self->priv->callback_target_destroy_notify (_data_->self->priv->callback_target), NULL);
+               _data_->self->priv->callback = NULL;
+               _data_->self->priv->callback_target = NULL;
+               _data_->self->priv->callback_target_destroy_notify = NULL;
+               _data_->self->priv->callback = _generator_feed_co_gsource_func;
+               _data_->self->priv->callback_target = _data_;
+               _data_->self->priv->callback_target_destroy_notify = NULL;
+               return FALSE;
+       }
        _state_1:
-       ;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               ;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 gboolean
@@ -694,36 +702,40 @@ int_generator_real_generate_co (IntGeneratorGenerateData* _data_)
        }
        _state_0:
        {
-               _data_->i = 0;
                {
-                       _data_->_tmp0_ = TRUE;
-                       while (TRUE) {
-                               if (!_data_->_tmp0_) {
-                                       _data_->_tmp1_ = _data_->i;
-                                       _data_->i = _data_->_tmp1_ + 1;
-                               }
-                               _data_->_tmp0_ = FALSE;
-                               if (!(_data_->i < 10)) {
-                                       break;
+                       _data_->i = 0;
+                       {
+                               _data_->_tmp0_ = TRUE;
+                               while (TRUE) {
+                                       if (!_data_->_tmp0_) {
+                                               _data_->_tmp1_ = _data_->i;
+                                               _data_->i = _data_->_tmp1_ + 1;
+                                       }
+                                       _data_->_tmp0_ = FALSE;
+                                       if (!(_data_->i < 10)) {
+                                               break;
+                                       }
+                                       if ((_data_->i % 2) == 0) {
+                                               _data_->_state_ = 1;
+                                               generator_feed (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, 
TYPE_GENERATOR, Generator), (gpointer) ((gintptr) _data_->i), int_generator_generate_ready, _data_);
+                                               return FALSE;
+                                               _state_1:
+                                               {
+                                                       generator_feed_finish (G_TYPE_CHECK_INSTANCE_CAST 
(_data_->self, TYPE_GENERATOR, Generator), _data_->_res_);
+                                               }
+                                       }
                                }
-                               if ((_data_->i % 2) == 0) {
-                                       _data_->_state_ = 1;
-                                       generator_feed (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, 
TYPE_GENERATOR, Generator), (gpointer) ((gintptr) _data_->i), int_generator_generate_ready, _data_);
-                                       return FALSE;
-                                       _state_1:
-                                       generator_feed_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, 
TYPE_GENERATOR, Generator), _data_->_res_);
+                       }
+                       g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                       if (_data_->_state_ != 0) {
+                               while (!g_task_get_completed (_data_->_async_result)) {
+                                       g_main_context_iteration (g_task_get_context (_data_->_async_result), 
TRUE);
                                }
                        }
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
                }
        }
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 IntGenerator*
diff --git a/tests/asynchronous/nowrapper.c-expected b/tests/asynchronous/nowrapper.c-expected
index 7f1f988c5..f5f3ad3bd 100644
--- a/tests/asynchronous/nowrapper.c-expected
+++ b/tests/asynchronous/nowrapper.c-expected
@@ -205,15 +205,17 @@ foo_real_bar_co (FooBarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->result = 23;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->result = 23;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -263,15 +265,17 @@ foo_real_manam_co (FooManamData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->result = 42;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->result = 42;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Foo*
diff --git a/tests/asynchronous/out-parameter-free-on-error.c-expected 
b/tests/asynchronous/out-parameter-free-on-error.c-expected
index f6468651b..945e9b58c 100644
--- a/tests/asynchronous/out-parameter-free-on-error.c-expected
+++ b/tests/asynchronous/out-parameter-free-on-error.c-expected
@@ -219,31 +219,33 @@ foo_async_co (FooAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = _g_object_ref0 (_data_->i);
-       _g_object_unref0 (_data_->o);
-       _data_->o = _data_->_tmp0_;
-       _data_->_tmp1_ = g_error_new_literal (FOO_ERROR, FOO_ERROR_FAIL, "foo");
-       _data_->_inner_error0_ = _data_->_tmp1_;
-       if (_data_->_inner_error0_->domain == FOO_ERROR) {
-               g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
-               _g_object_unref0 (_data_->o);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       } else {
+       {
+               _data_->_tmp0_ = _g_object_ref0 (_data_->i);
                _g_object_unref0 (_data_->o);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
+               _data_->o = _data_->_tmp0_;
+               _data_->_tmp1_ = g_error_new_literal (FOO_ERROR, FOO_ERROR_FAIL, "foo");
+               _data_->_inner_error0_ = _data_->_tmp1_;
+               if (_data_->_inner_error0_->domain == FOO_ERROR) {
+                       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+                       _g_object_unref0 (_data_->o);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               } else {
+                       _g_object_unref0 (_data_->o);
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
+               }
                g_object_unref (_data_->_async_result);
                return FALSE;
        }
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -296,49 +298,53 @@ run_co (RunData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = manam_new ();
-       _data_->manam = _data_->_tmp0_;
-       _vala_assert (G_TYPE_CHECK_INSTANCE_CAST (_data_->manam, G_TYPE_OBJECT, GObject)->ref_count == 
((guint) 1), "manam.ref_count == 1");
        {
-               _data_->_tmp1_ = NULL;
-               _data_->_state_ = 1;
-               foo_async (_data_->manam, run_ready, _data_);
-               return FALSE;
-               _state_1:
-               foo_finish (_data_->_res_, &_data_->_tmp1_, &_data_->_inner_error0_);
-               _g_object_unref0 (_data_->minim);
-               _data_->minim = _data_->_tmp1_;
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       _g_object_unref0 (_data_->minim);
-                       goto __catch0_g_error;
-               }
-               _g_object_unref0 (_data_->minim);
-       }
-       goto __finally0;
-       __catch0_g_error:
-       {
-               g_clear_error (&_data_->_inner_error0_);
-       }
-       __finally0:
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->manam);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       _vala_assert (G_TYPE_CHECK_INSTANCE_CAST (_data_->manam, G_TYPE_OBJECT, GObject)->ref_count == 
((guint) 2), "manam.ref_count == 2");
-       _data_->_tmp2_ = loop;
-       g_main_loop_quit (_data_->_tmp2_);
-       _g_object_unref0 (_data_->manam);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+               _data_->_tmp0_ = manam_new ();
+               _data_->manam = _data_->_tmp0_;
+               _vala_assert (G_TYPE_CHECK_INSTANCE_CAST (_data_->manam, G_TYPE_OBJECT, GObject)->ref_count 
== ((guint) 1), "manam.ref_count == 1");
+               {
+                       _data_->_state_ = 1;
+                       _data_->_tmp1_ = NULL;
+                       foo_async (_data_->manam, run_ready, _data_);
+                       return FALSE;
+                       _state_1:
+                       {
+                               foo_finish (_data_->_res_, &_data_->_tmp1_, &_data_->_inner_error0_);
+                               _g_object_unref0 (_data_->minim);
+                               _data_->minim = _data_->_tmp1_;
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       _g_object_unref0 (_data_->minim);
+                                       goto __catch0_g_error;
+                               }
+                               _g_object_unref0 (_data_->minim);
+                       }
+                       goto __finally0;
+                       __catch0_g_error:
+                       {
+                               g_clear_error (&_data_->_inner_error0_);
+                       }
+                       __finally0:
+                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                               _g_object_unref0 (_data_->manam);
+                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                               g_clear_error (&_data_->_inner_error0_);
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
+                       }
+                       _vala_assert (G_TYPE_CHECK_INSTANCE_CAST (_data_->manam, G_TYPE_OBJECT, 
GObject)->ref_count == ((guint) 2), "manam.ref_count == 2");
+                       _data_->_tmp2_ = loop;
+                       g_main_loop_quit (_data_->_tmp2_);
+                       _g_object_unref0 (_data_->manam);
+                       g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                       if (_data_->_state_ != 0) {
+                               while (!g_task_get_completed (_data_->_async_result)) {
+                                       g_main_context_iteration (g_task_get_context (_data_->_async_result), 
TRUE);
+                               }
+                       }
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
                }
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/result-pos.c-expected b/tests/asynchronous/result-pos.c-expected
index 0875b0cd8..6fdec0613 100644
--- a/tests/asynchronous/result-pos.c-expected
+++ b/tests/asynchronous/result-pos.c-expected
@@ -134,15 +134,17 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->out_i = _data_->in_i;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->out_i = _data_->in_i;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -191,15 +193,17 @@ bar_co (BarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->out_i = _data_->in_i;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->out_i = _data_->in_i;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -254,50 +258,56 @@ run_co (RunData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = 0;
-       _data_->_state_ = 1;
-       foo (323, run_ready, _data_);
-       return FALSE;
-       _state_1:
-       foo_finish (&_data_->_tmp0_, _data_->_res_);
-       _data_->i = _data_->_tmp0_;
-       _vala_assert (_data_->i == 323, "i == 323");
        {
-               _data_->_tmp1_ = 0;
-               _data_->_state_ = 2;
-               bar (742, run_ready, _data_);
+               _data_->_state_ = 1;
+               _data_->_tmp0_ = 0;
+               foo (323, run_ready, _data_);
                return FALSE;
-               _state_2:
-               bar_finish (&_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_);
-               _data_->i = _data_->_tmp1_;
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       goto __catch0_g_error;
-               }
-               _vala_assert (_data_->i == 742, "i == 742");
        }
-       goto __finally0;
-       __catch0_g_error:
+       _state_1:
        {
-               g_clear_error (&_data_->_inner_error0_);
-               g_assert_not_reached ();
-       }
-       __finally0:
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       _data_->_tmp2_ = loop;
-       g_main_loop_quit (_data_->_tmp2_);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+               foo_finish (&_data_->_tmp0_, _data_->_res_);
+               _data_->i = _data_->_tmp0_;
+               _vala_assert (_data_->i == 323, "i == 323");
+               {
+                       _data_->_state_ = 2;
+                       _data_->_tmp1_ = 0;
+                       bar (742, run_ready, _data_);
+                       return FALSE;
+                       _state_2:
+                       {
+                               bar_finish (&_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_);
+                               _data_->i = _data_->_tmp1_;
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       goto __catch0_g_error;
+                               }
+                               _vala_assert (_data_->i == 742, "i == 742");
+                       }
+                       goto __finally0;
+                       __catch0_g_error:
+                       {
+                               g_clear_error (&_data_->_inner_error0_);
+                               g_assert_not_reached ();
+                       }
+                       __finally0:
+                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                               g_clear_error (&_data_->_inner_error0_);
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
+                       }
+                       _data_->_tmp2_ = loop;
+                       g_main_loop_quit (_data_->_tmp2_);
+                       g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                       if (_data_->_state_ != 0) {
+                               while (!g_task_get_completed (_data_->_async_result)) {
+                                       g_main_context_iteration (g_task_get_context (_data_->_async_result), 
TRUE);
+                               }
+                       }
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
                }
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/asynchronous/yield.c-expected b/tests/asynchronous/yield.c-expected
index 993fdbc33..9210969ca 100644
--- a/tests/asynchronous/yield.c-expected
+++ b/tests/asynchronous/yield.c-expected
@@ -67,20 +67,24 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       while (TRUE) {
-               _data_->_state_ = 1;
-               return FALSE;
-               _state_1:
-               ;
-       }
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               while (TRUE) {
+                       _data_->_state_ = 1;
+                       return FALSE;
+                       _state_1:
+                       {
+                               ;
+                       }
+                       g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                       if (_data_->_state_ != 0) {
+                               while (!g_task_get_completed (_data_->_async_result)) {
+                                       g_main_context_iteration (g_task_get_context (_data_->_async_result), 
TRUE);
+                               }
+                       }
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
                }
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/dbus/async-errors_client.c-expected b/tests/dbus/async-errors_client.c-expected
index 955926973..e8292c818 100644
--- a/tests/dbus/async-errors_client.c-expected
+++ b/tests/dbus/async-errors_client.c-expected
@@ -971,149 +971,161 @@ run_co (RunData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       g_async_initable_new_async (TYPE_TEST_PROXY, 0, NULL, run_ready, _data_, "g-flags", 0, "g-name", 
"org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/test", 
"g-interface-name", "org.example.Test", NULL);
-       return FALSE;
-       _state_1:
-       _data_->_tmp0_ = (Test*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, 
_data_->_res_, &_data_->_inner_error0_);
-       _data_->test = (Test*) _data_->_tmp0_;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       {
-               _data_->_state_ = 2;
-               test_test_void (_data_->test, run_ready, _data_);
-               return FALSE;
-               _state_2:
-               test_test_void_finish (_data_->test, _data_->_res_, &_data_->_inner_error0_);
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       goto __catch0_g_error;
-               }
-               g_assert_not_reached ();
-       }
-       goto __finally0;
-       __catch0_g_error:
-       {
-               g_clear_error (&_data_->_inner_error0_);
-       }
-       __finally0:
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->test);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       {
-               _data_->_tmp2_ = 0;
-               _data_->_state_ = 3;
-               test_test_int (_data_->test, 42, run_ready, _data_);
-               return FALSE;
-               _state_3:
-               _data_->_tmp3_ = test_test_int_finish (_data_->test, _data_->_res_, &_data_->_tmp2_, 
&_data_->_inner_error0_);
-               _data_->j = _data_->_tmp2_;
-               _data_->_tmp1_ = _data_->_tmp3_;
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       goto __catch1_g_error;
-               }
-               _data_->k = _data_->_tmp1_;
-               g_assert_not_reached ();
-       }
-       goto __finally1;
-       __catch1_g_error:
        {
-               g_clear_error (&_data_->_inner_error0_);
-       }
-       __finally1:
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->test);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       {
-               _data_->_tmp5_ = NULL;
-               _data_->_state_ = 4;
-               test_test_string (_data_->test, "hello", run_ready, _data_);
-               return FALSE;
-               _state_4:
-               _data_->_tmp6_ = test_test_string_finish (_data_->test, _data_->_res_, &_data_->_tmp5_, 
&_data_->_inner_error0_);
-               _g_free0 (_data_->t);
-               _data_->t = _data_->_tmp5_;
-               _data_->_tmp4_ = _data_->_tmp6_;
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       _g_free0 (_data_->u);
-                       _g_free0 (_data_->t);
-                       goto __catch2_g_error;
-               }
-               _data_->_tmp7_ = _data_->_tmp4_;
-               _data_->_tmp4_ = NULL;
-               _g_free0 (_data_->u);
-               _data_->u = _data_->_tmp7_;
-               g_assert_not_reached ();
-               _g_free0 (_data_->_tmp4_);
-               _g_free0 (_data_->u);
-               _g_free0 (_data_->t);
-       }
-       goto __finally2;
-       __catch2_g_error:
-       {
-               g_clear_error (&_data_->_inner_error0_);
-       }
-       __finally2:
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->test);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
+               _data_->_state_ = 1;
+               g_async_initable_new_async (TYPE_TEST_PROXY, 0, NULL, run_ready, _data_, "g-flags", 0, 
"g-name", "org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/test", 
"g-interface-name", "org.example.Test", NULL);
                return FALSE;
        }
+       _state_1:
        {
-               _data_->_tmp8_ = g_cancellable_new ();
-               _data_->cancellable = _data_->_tmp8_;
-               _data_->_tmp9_ = _data_->cancellable;
-               g_cancellable_cancel (_data_->_tmp9_);
-               _data_->_tmp10_ = _data_->cancellable;
-               _data_->_state_ = 5;
-               test_test_cancellable (_data_->test, _data_->_tmp10_, run_ready, _data_);
-               return FALSE;
-               _state_5:
-               test_test_cancellable_finish (_data_->test, _data_->_res_, &_data_->_inner_error0_);
+               _data_->_tmp0_ = (Test*) g_async_initable_new_finish ((GAsyncInitable *) 
_data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
+               _data_->test = (Test*) _data_->_tmp0_;
                if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       _g_object_unref0 (_data_->cancellable);
-                       goto __catch3_g_error;
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
                }
-               g_assert_not_reached ();
-               _g_object_unref0 (_data_->cancellable);
-       }
-       goto __finally3;
-       __catch3_g_error:
-       {
-               g_clear_error (&_data_->_inner_error0_);
-       }
-       __finally3:
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->test);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       _data_->_tmp11_ = main_loop;
-       g_main_loop_quit (_data_->_tmp11_);
-       _g_object_unref0 (_data_->test);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+               {
+                       _data_->_state_ = 2;
+                       test_test_void (_data_->test, run_ready, _data_);
+                       return FALSE;
+                       _state_2:
+                       {
+                               test_test_void_finish (_data_->test, _data_->_res_, &_data_->_inner_error0_);
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       goto __catch0_g_error;
+                               }
+                               g_assert_not_reached ();
+                       }
+                       goto __finally0;
+                       __catch0_g_error:
+                       {
+                               g_clear_error (&_data_->_inner_error0_);
+                       }
+                       __finally0:
+                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                               _g_object_unref0 (_data_->test);
+                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                               g_clear_error (&_data_->_inner_error0_);
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
+                       }
+                       {
+                               _data_->_state_ = 3;
+                               _data_->_tmp2_ = 0;
+                               test_test_int (_data_->test, 42, run_ready, _data_);
+                               return FALSE;
+                       }
+                       _state_3:
+                       {
+                               _data_->_tmp3_ = test_test_int_finish (_data_->test, _data_->_res_, 
&_data_->_tmp2_, &_data_->_inner_error0_);
+                               _data_->j = _data_->_tmp2_;
+                               _data_->_tmp1_ = _data_->_tmp3_;
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       goto __catch1_g_error;
+                               }
+                               _data_->k = _data_->_tmp1_;
+                               g_assert_not_reached ();
+                       }
+                       goto __finally1;
+                       __catch1_g_error:
+                       {
+                               g_clear_error (&_data_->_inner_error0_);
+                       }
+                       __finally1:
+                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                               _g_object_unref0 (_data_->test);
+                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                               g_clear_error (&_data_->_inner_error0_);
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
+                       }
+                       {
+                               _data_->_state_ = 4;
+                               _data_->_tmp5_ = NULL;
+                               test_test_string (_data_->test, "hello", run_ready, _data_);
+                               return FALSE;
+                       }
+                       _state_4:
+                       {
+                               _data_->_tmp6_ = test_test_string_finish (_data_->test, _data_->_res_, 
&_data_->_tmp5_, &_data_->_inner_error0_);
+                               _g_free0 (_data_->t);
+                               _data_->t = _data_->_tmp5_;
+                               _data_->_tmp4_ = _data_->_tmp6_;
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       _g_free0 (_data_->u);
+                                       _g_free0 (_data_->t);
+                                       goto __catch2_g_error;
+                               }
+                               _data_->_tmp7_ = _data_->_tmp4_;
+                               _data_->_tmp4_ = NULL;
+                               _g_free0 (_data_->u);
+                               _data_->u = _data_->_tmp7_;
+                               g_assert_not_reached ();
+                               _g_free0 (_data_->_tmp4_);
+                               _g_free0 (_data_->u);
+                               _g_free0 (_data_->t);
+                       }
+                       goto __finally2;
+                       __catch2_g_error:
+                       {
+                               g_clear_error (&_data_->_inner_error0_);
+                       }
+                       __finally2:
+                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                               _g_object_unref0 (_data_->test);
+                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                               g_clear_error (&_data_->_inner_error0_);
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
+                       }
+                       {
+                               _data_->_state_ = 5;
+                               _data_->_tmp8_ = g_cancellable_new ();
+                               _data_->cancellable = _data_->_tmp8_;
+                               _data_->_tmp9_ = _data_->cancellable;
+                               g_cancellable_cancel (_data_->_tmp9_);
+                               _data_->_tmp10_ = _data_->cancellable;
+                               test_test_cancellable (_data_->test, _data_->_tmp10_, run_ready, _data_);
+                               return FALSE;
+                       }
+                       _state_5:
+                       {
+                               test_test_cancellable_finish (_data_->test, _data_->_res_, 
&_data_->_inner_error0_);
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       _g_object_unref0 (_data_->cancellable);
+                                       goto __catch3_g_error;
+                               }
+                               g_assert_not_reached ();
+                               _g_object_unref0 (_data_->cancellable);
+                       }
+                       goto __finally3;
+                       __catch3_g_error:
+                       {
+                               g_clear_error (&_data_->_inner_error0_);
+                       }
+                       __finally3:
+                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                               _g_object_unref0 (_data_->test);
+                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                               g_clear_error (&_data_->_inner_error0_);
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
+                       }
+                       _data_->_tmp11_ = main_loop;
+                       g_main_loop_quit (_data_->_tmp11_);
+                       _g_object_unref0 (_data_->test);
+                       g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                       if (_data_->_state_ != 0) {
+                               while (!g_task_get_completed (_data_->_async_result)) {
+                                       g_main_context_iteration (g_task_get_context (_data_->_async_result), 
TRUE);
+                               }
+                       }
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
                }
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/dbus/async-errors_server.c-expected b/tests/dbus/async-errors_server.c-expected
index aaae816eb..e83ddcbd5 100644
--- a/tests/dbus/async-errors_server.c-expected
+++ b/tests/dbus/async-errors_server.c-expected
@@ -324,24 +324,28 @@ test_test_void_co (TestTestVoidData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_void_co_gsource_func, _data_, NULL);
-       _data_->_state_ = 1;
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_void_co_gsource_func, _data_, NULL);
+               return FALSE;
+       }
        _state_1:
-       ;
-       _data_->_tmp0_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_FAILED, "Operation failed");
-       _data_->_inner_error0_ = _data_->_tmp0_;
-       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
-       g_object_unref (_data_->_async_result);
-       return FALSE;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               ;
+               _data_->_tmp0_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_FAILED, "Operation failed");
+               _data_->_inner_error0_ = _data_->_tmp0_;
+               g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+               g_object_unref (_data_->_async_result);
+               return FALSE;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -411,16 +415,20 @@ test_test_int_co (TestTestIntData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_int_co_gsource_func, _data_, NULL);
-       _data_->_state_ = 1;
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_int_co_gsource_func, _data_, NULL);
+               return FALSE;
+       }
        _state_1:
-       ;
-       _data_->_tmp0_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_FAILED, "Operation failed");
-       _data_->_inner_error0_ = _data_->_tmp0_;
-       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
-       g_object_unref (_data_->_async_result);
-       return FALSE;
+       {
+               ;
+               _data_->_tmp0_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_FAILED, "Operation failed");
+               _data_->_inner_error0_ = _data_->_tmp0_;
+               g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+               g_object_unref (_data_->_async_result);
+               return FALSE;
+       }
 }
 
 static void
@@ -499,17 +507,21 @@ test_test_string_co (TestTestStringData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_string_co_gsource_func, _data_, NULL);
-       _data_->_state_ = 1;
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_string_co_gsource_func, _data_, NULL);
+               return FALSE;
+       }
        _state_1:
-       ;
-       _data_->_tmp0_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_FAILED, "Operation failed");
-       _data_->_inner_error0_ = _data_->_tmp0_;
-       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
-       _g_free0 (_data_->t);
-       g_object_unref (_data_->_async_result);
-       return FALSE;
+       {
+               ;
+               _data_->_tmp0_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_FAILED, "Operation failed");
+               _data_->_inner_error0_ = _data_->_tmp0_;
+               g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+               _g_free0 (_data_->t);
+               g_object_unref (_data_->_async_result);
+               return FALSE;
+       }
 }
 
 static void
@@ -576,19 +588,23 @@ test_test_cancellable_co (TestTestCancellableData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_cancellable_co_gsource_func, _data_, NULL);
-       _data_->_state_ = 1;
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_cancellable_co_gsource_func, _data_, 
NULL);
+               return FALSE;
+       }
        _state_1:
-       ;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               ;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Test*
diff --git a/tests/dbus/async-no-reply_client.c-expected b/tests/dbus/async-no-reply_client.c-expected
index c69a9b321..754d03b85 100644
--- a/tests/dbus/async-no-reply_client.c-expected
+++ b/tests/dbus/async-no-reply_client.c-expected
@@ -818,149 +818,159 @@ run_co (RunData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_data1_ = g_slice_new0 (Block1Data);
-       _data_->_data1_->_ref_count_ = 1;
-       _data_->_data1_->_async_data_ = _data_;
-       _data_->_state_ = 1;
-       g_async_initable_new_async (TYPE_TEST_PROXY, 0, NULL, run_ready, _data_, "g-flags", 0, "g-name", 
"org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/Test", 
"g-interface-name", "org.example.Test", NULL);
-       return FALSE;
+       {
+               _data_->_data1_ = g_slice_new0 (Block1Data);
+               _data_->_data1_->_ref_count_ = 1;
+               _data_->_data1_->_async_data_ = _data_;
+               _data_->_state_ = 1;
+               g_async_initable_new_async (TYPE_TEST_PROXY, 0, NULL, run_ready, _data_, "g-flags", 0, 
"g-name", "org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/Test", 
"g-interface-name", "org.example.Test", NULL);
+               return FALSE;
+       }
        _state_1:
-       _data_->_tmp0_ = (Test*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, 
_data_->_res_, &_data_->_inner_error0_);
-       _data_->test = (Test*) _data_->_tmp0_;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               block1_data_unref (_data_->_data1_);
-               _data_->_data1_ = NULL;
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
+       {
+               _data_->_state_ = 2;
+               _data_->_tmp0_ = (Test*) g_async_initable_new_finish ((GAsyncInitable *) 
_data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
+               _data_->test = (Test*) _data_->_tmp0_;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       block1_data_unref (_data_->_data1_);
+                       _data_->_data1_ = NULL;
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp1_ = g_async_queue_new_full (_g_free0_);
+               _data_->_data1_->events = _data_->_tmp1_;
+               _data_->_tmp2_ = _data_->test;
+               g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp2_, g_dbus_proxy_get_type (), 
GDBusProxy), "g-connection", &_data_->_tmp3_, NULL);
+               _data_->_tmp4_ = _data_->_tmp3_;
+               _data_->connection = _data_->_tmp4_;
+               _data_->_tmp5_ = _data_->connection;
+               g_dbus_connection_add_filter (_data_->_tmp5_, ___lambda4__gd_bus_message_filter_function, 
block1_data_ref (_data_->_data1_), block1_data_unref);
+               _data_->_tmp6_ = _data_->test;
+               _data_->_tmp7_ = 0;
+               test_list_messages (_data_->_tmp6_, run_ready, _data_);
                return FALSE;
        }
-       _data_->_tmp1_ = g_async_queue_new_full (_g_free0_);
-       _data_->_data1_->events = _data_->_tmp1_;
-       _data_->_tmp2_ = _data_->test;
-       g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp2_, g_dbus_proxy_get_type (), GDBusProxy), 
"g-connection", &_data_->_tmp3_, NULL);
-       _data_->_tmp4_ = _data_->_tmp3_;
-       _data_->connection = _data_->_tmp4_;
-       _data_->_tmp5_ = _data_->connection;
-       g_dbus_connection_add_filter (_data_->_tmp5_, ___lambda4__gd_bus_message_filter_function, 
block1_data_ref (_data_->_data1_), block1_data_unref);
-       _data_->_tmp6_ = _data_->test;
-       _data_->_tmp7_ = 0;
-       _data_->_state_ = 2;
-       test_list_messages (_data_->_tmp6_, run_ready, _data_);
-       return FALSE;
        _state_2:
-       _data_->_tmp8_ = test_list_messages_finish (_data_->_tmp6_, _data_->_res_, &_data_->_tmp7_, 
&_data_->_inner_error0_);
-       _data_->messages = _data_->_tmp8_;
-       _data_->messages_length1 = _data_->_tmp7_;
-       _data_->_messages_size_ = _data_->messages_length1;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->connection);
-               _g_object_unref0 (_data_->test);
-               block1_data_unref (_data_->_data1_);
-               _data_->_data1_ = NULL;
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
+       {
+               _data_->_state_ = 3;
+               _data_->_tmp8_ = test_list_messages_finish (_data_->_tmp6_, _data_->_res_, &_data_->_tmp7_, 
&_data_->_inner_error0_);
+               _data_->messages = _data_->_tmp8_;
+               _data_->messages_length1 = _data_->_tmp7_;
+               _data_->_messages_size_ = _data_->messages_length1;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _g_object_unref0 (_data_->connection);
+                       _g_object_unref0 (_data_->test);
+                       block1_data_unref (_data_->_data1_);
+                       _data_->_data1_ = NULL;
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp9_ = _data_->messages;
+               _data_->_tmp9__length1 = _data_->messages_length1;
+               _vala_assert (_data_->_tmp9__length1 == 0, "messages.length == 0");
+               _data_->_tmp10_ = _data_->test;
+               test_post_message (_data_->_tmp10_, "round-trip", run_ready, _data_);
                return FALSE;
        }
-       _data_->_tmp9_ = _data_->messages;
-       _data_->_tmp9__length1 = _data_->messages_length1;
-       _vala_assert (_data_->_tmp9__length1 == 0, "messages.length == 0");
-       _data_->_tmp10_ = _data_->test;
-       _data_->_state_ = 3;
-       test_post_message (_data_->_tmp10_, "round-trip", run_ready, _data_);
-       return FALSE;
        _state_3:
-       test_post_message_finish (_data_->_tmp10_, _data_->_res_, &_data_->_inner_error0_);
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, 
(GDestroyNotify) g_free), NULL);
-               _g_object_unref0 (_data_->connection);
-               _g_object_unref0 (_data_->test);
-               block1_data_unref (_data_->_data1_);
-               _data_->_data1_ = NULL;
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
+       {
+               _data_->_state_ = 4;
+               test_post_message_finish (_data_->_tmp10_, _data_->_res_, &_data_->_inner_error0_);
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, 
(GDestroyNotify) g_free), NULL);
+                       _g_object_unref0 (_data_->connection);
+                       _g_object_unref0 (_data_->test);
+                       block1_data_unref (_data_->_data1_);
+                       _data_->_data1_ = NULL;
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp11_ = _data_->_data1_->events;
+               _data_->_tmp12_ = g_async_queue_pop (_data_->_tmp11_);
+               _data_->_tmp13_ = (gchar*) _data_->_tmp12_;
+               _vala_assert (g_strcmp0 (_data_->_tmp13_, "G_DBUS_MESSAGE_FLAGS_NONE") == 0, "events.pop () 
== \"G_DBUS_MESSAGE_FLAGS_NONE\"");
+               _g_free0 (_data_->_tmp13_);
+               _data_->_tmp14_ = _data_->_data1_->events;
+               _data_->_tmp15_ = g_async_queue_try_pop (_data_->_tmp14_);
+               _data_->_tmp16_ = (gchar*) _data_->_tmp15_;
+               _vala_assert (_data_->_tmp16_ == NULL, "events.try_pop () == null");
+               _g_free0 (_data_->_tmp16_);
+               _data_->_tmp17_ = _data_->test;
+               test_post_message (_data_->_tmp17_, "fire-and-forget", NULL, NULL);
+               _data_->_tmp18_ = _data_->_data1_->events;
+               _data_->_tmp19_ = g_async_queue_pop (_data_->_tmp18_);
+               _data_->_tmp20_ = (gchar*) _data_->_tmp19_;
+               _vala_assert (g_strcmp0 (_data_->_tmp20_, "G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED") == 0, 
"events.pop () == \"G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED\"");
+               _g_free0 (_data_->_tmp20_);
+               _data_->_tmp21_ = _data_->_data1_->events;
+               _data_->_tmp22_ = g_async_queue_try_pop (_data_->_tmp21_);
+               _data_->_tmp23_ = (gchar*) _data_->_tmp22_;
+               _vala_assert (_data_->_tmp23_ == NULL, "events.try_pop () == null");
+               _g_free0 (_data_->_tmp23_);
+               _data_->_tmp25_ = _data_->test;
+               _data_->_tmp26_ = 0;
+               test_list_messages (_data_->_tmp25_, run_ready, _data_);
                return FALSE;
        }
-       _data_->_tmp11_ = _data_->_data1_->events;
-       _data_->_tmp12_ = g_async_queue_pop (_data_->_tmp11_);
-       _data_->_tmp13_ = (gchar*) _data_->_tmp12_;
-       _vala_assert (g_strcmp0 (_data_->_tmp13_, "G_DBUS_MESSAGE_FLAGS_NONE") == 0, "events.pop () == 
\"G_DBUS_MESSAGE_FLAGS_NONE\"");
-       _g_free0 (_data_->_tmp13_);
-       _data_->_tmp14_ = _data_->_data1_->events;
-       _data_->_tmp15_ = g_async_queue_try_pop (_data_->_tmp14_);
-       _data_->_tmp16_ = (gchar*) _data_->_tmp15_;
-       _vala_assert (_data_->_tmp16_ == NULL, "events.try_pop () == null");
-       _g_free0 (_data_->_tmp16_);
-       _data_->_tmp17_ = _data_->test;
-       test_post_message (_data_->_tmp17_, "fire-and-forget", NULL, NULL);
-       _data_->_tmp18_ = _data_->_data1_->events;
-       _data_->_tmp19_ = g_async_queue_pop (_data_->_tmp18_);
-       _data_->_tmp20_ = (gchar*) _data_->_tmp19_;
-       _vala_assert (g_strcmp0 (_data_->_tmp20_, "G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED") == 0, "events.pop 
() == \"G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED\"");
-       _g_free0 (_data_->_tmp20_);
-       _data_->_tmp21_ = _data_->_data1_->events;
-       _data_->_tmp22_ = g_async_queue_try_pop (_data_->_tmp21_);
-       _data_->_tmp23_ = (gchar*) _data_->_tmp22_;
-       _vala_assert (_data_->_tmp23_ == NULL, "events.try_pop () == null");
-       _g_free0 (_data_->_tmp23_);
-       _data_->_tmp25_ = _data_->test;
-       _data_->_tmp26_ = 0;
-       _data_->_state_ = 4;
-       test_list_messages (_data_->_tmp25_, run_ready, _data_);
-       return FALSE;
        _state_4:
-       _data_->_tmp27_ = test_list_messages_finish (_data_->_tmp25_, _data_->_res_, &_data_->_tmp26_, 
&_data_->_inner_error0_);
-       _data_->_tmp24_ = _data_->_tmp27_;
-       _data_->_tmp24__length1 = _data_->_tmp26_;
-       _data_->__tmp24__size_ = _data_->_tmp24__length1;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+       {
+               _data_->_tmp27_ = test_list_messages_finish (_data_->_tmp25_, _data_->_res_, 
&_data_->_tmp26_, &_data_->_inner_error0_);
+               _data_->_tmp24_ = _data_->_tmp27_;
+               _data_->_tmp24__length1 = _data_->_tmp26_;
+               _data_->__tmp24__size_ = _data_->_tmp24__length1;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, 
(GDestroyNotify) g_free), NULL);
+                       _g_object_unref0 (_data_->connection);
+                       _g_object_unref0 (_data_->test);
+                       block1_data_unref (_data_->_data1_);
+                       _data_->_data1_ = NULL;
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp28_ = _data_->_tmp24_;
+               _data_->_tmp28__length1 = _data_->_tmp24__length1;
+               _data_->_tmp24_ = NULL;
+               _data_->_tmp24__length1 = 0;
+               _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, 
(GDestroyNotify) g_free), NULL);
+               _data_->messages = _data_->_tmp28_;
+               _data_->messages_length1 = _data_->_tmp28__length1;
+               _data_->_messages_size_ = _data_->messages_length1;
+               _data_->_tmp29_ = _data_->messages;
+               _data_->_tmp29__length1 = _data_->messages_length1;
+               _vala_assert (_data_->_tmp29__length1 == 2, "messages.length == 2");
+               _data_->_tmp30_ = _data_->messages;
+               _data_->_tmp30__length1 = _data_->messages_length1;
+               _data_->_tmp31_ = _data_->_tmp30_[0];
+               _vala_assert (g_strcmp0 (_data_->_tmp31_, "round-trip") == 0, "messages[0] == 
\"round-trip\"");
+               _data_->_tmp32_ = _data_->messages;
+               _data_->_tmp32__length1 = _data_->messages_length1;
+               _data_->_tmp33_ = _data_->_tmp32_[1];
+               _vala_assert (g_strcmp0 (_data_->_tmp33_, "fire-and-forget") == 0, "messages[1] == 
\"fire-and-forget\"");
+               _data_->_tmp34_ = main_loop;
+               g_main_loop_quit (_data_->_tmp34_);
+               _data_->_tmp24_ = (_vala_array_free (_data_->_tmp24_, _data_->_tmp24__length1, 
(GDestroyNotify) g_free), NULL);
                _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, 
(GDestroyNotify) g_free), NULL);
                _g_object_unref0 (_data_->connection);
                _g_object_unref0 (_data_->test);
                block1_data_unref (_data_->_data1_);
                _data_->_data1_ = NULL;
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
+               }
                g_object_unref (_data_->_async_result);
                return FALSE;
        }
-       _data_->_tmp28_ = _data_->_tmp24_;
-       _data_->_tmp28__length1 = _data_->_tmp24__length1;
-       _data_->_tmp24_ = NULL;
-       _data_->_tmp24__length1 = 0;
-       _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, (GDestroyNotify) 
g_free), NULL);
-       _data_->messages = _data_->_tmp28_;
-       _data_->messages_length1 = _data_->_tmp28__length1;
-       _data_->_messages_size_ = _data_->messages_length1;
-       _data_->_tmp29_ = _data_->messages;
-       _data_->_tmp29__length1 = _data_->messages_length1;
-       _vala_assert (_data_->_tmp29__length1 == 2, "messages.length == 2");
-       _data_->_tmp30_ = _data_->messages;
-       _data_->_tmp30__length1 = _data_->messages_length1;
-       _data_->_tmp31_ = _data_->_tmp30_[0];
-       _vala_assert (g_strcmp0 (_data_->_tmp31_, "round-trip") == 0, "messages[0] == \"round-trip\"");
-       _data_->_tmp32_ = _data_->messages;
-       _data_->_tmp32__length1 = _data_->messages_length1;
-       _data_->_tmp33_ = _data_->_tmp32_[1];
-       _vala_assert (g_strcmp0 (_data_->_tmp33_, "fire-and-forget") == 0, "messages[1] == 
\"fire-and-forget\"");
-       _data_->_tmp34_ = main_loop;
-       g_main_loop_quit (_data_->_tmp34_);
-       _data_->_tmp24_ = (_vala_array_free (_data_->_tmp24_, _data_->_tmp24__length1, (GDestroyNotify) 
g_free), NULL);
-       _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, (GDestroyNotify) 
g_free), NULL);
-       _g_object_unref0 (_data_->connection);
-       _g_object_unref0 (_data_->test);
-       block1_data_unref (_data_->_data1_);
-       _data_->_data1_ = NULL;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/dbus/async-no-reply_server.c-expected b/tests/dbus/async-no-reply_server.c-expected
index e2e894c60..2d2c193c4 100644
--- a/tests/dbus/async-no-reply_server.c-expected
+++ b/tests/dbus/async-no-reply_server.c-expected
@@ -276,22 +276,24 @@ test_list_messages_co (TestListMessagesData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = _data_->self->priv->messages;
-       _data_->_tmp0__length1 = _data_->self->priv->messages_length1;
-       _data_->_tmp1_ = (_data_->_tmp0_ != NULL) ? _vala_array_dup1 (_data_->_tmp0_, _data_->_tmp0__length1) 
: _data_->_tmp0_;
-       _data_->_tmp1__length1 = _data_->_tmp0__length1;
-       _data_->_tmp2_ = _data_->_tmp1_;
-       _data_->_tmp2__length1 = _data_->_tmp1__length1;
-       _data_->result_length1 = _data_->_tmp2__length1;
-       _data_->result = _data_->_tmp2_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = _data_->self->priv->messages;
+               _data_->_tmp0__length1 = _data_->self->priv->messages_length1;
+               _data_->_tmp1_ = (_data_->_tmp0_ != NULL) ? _vala_array_dup1 (_data_->_tmp0_, 
_data_->_tmp0__length1) : _data_->_tmp0_;
+               _data_->_tmp1__length1 = _data_->_tmp0__length1;
+               _data_->_tmp2_ = _data_->_tmp1_;
+               _data_->_tmp2__length1 = _data_->_tmp1__length1;
+               _data_->result_length1 = _data_->_tmp2__length1;
+               _data_->result = _data_->_tmp2_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -358,16 +360,18 @@ test_post_message_co (TestPostMessageData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = g_strdup (_data_->message);
-       _vala_array_add1 (&_data_->self->priv->messages, &_data_->self->priv->messages_length1, 
&_data_->self->priv->_messages_size_, _data_->_tmp0_);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = g_strdup (_data_->message);
+               _vala_array_add1 (&_data_->self->priv->messages, &_data_->self->priv->messages_length1, 
&_data_->self->priv->_messages_size_, _data_->_tmp0_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Test*
diff --git a/tests/dbus/async_client.c-expected b/tests/dbus/async_client.c-expected
index 343fff00a..5bef3d59d 100644
--- a/tests/dbus/async_client.c-expected
+++ b/tests/dbus/async_client.c-expected
@@ -834,91 +834,101 @@ run_co (RunData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       g_async_initable_new_async (TYPE_TEST_PROXY, 0, NULL, run_ready, _data_, "g-flags", 0, "g-name", 
"org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/test", 
"g-interface-name", "org.example.Test", NULL);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               g_async_initable_new_async (TYPE_TEST_PROXY, 0, NULL, run_ready, _data_, "g-flags", 0, 
"g-name", "org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/test", 
"g-interface-name", "org.example.Test", NULL);
+               return FALSE;
+       }
        _state_1:
-       _data_->_tmp0_ = (Test*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, 
_data_->_res_, &_data_->_inner_error0_);
-       _data_->test = (Test*) _data_->_tmp0_;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
+       {
+               _data_->_state_ = 2;
+               _data_->_tmp0_ = (Test*) g_async_initable_new_finish ((GAsyncInitable *) 
_data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
+               _data_->test = (Test*) _data_->_tmp0_;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp1_ = _data_->test;
+               test_test_void (_data_->_tmp1_, run_ready, _data_);
                return FALSE;
        }
-       _data_->_tmp1_ = _data_->test;
-       _data_->_state_ = 2;
-       test_test_void (_data_->_tmp1_, run_ready, _data_);
-       return FALSE;
        _state_2:
-       test_test_void_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_);
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->test);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
+       {
+               _data_->_state_ = 3;
+               test_test_void_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_);
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _g_object_unref0 (_data_->test);
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp3_ = _data_->test;
+               _data_->_tmp4_ = 0;
+               test_test_int (_data_->_tmp3_, 42, run_ready, _data_);
                return FALSE;
        }
-       _data_->_tmp3_ = _data_->test;
-       _data_->_tmp4_ = 0;
-       _data_->_state_ = 3;
-       test_test_int (_data_->_tmp3_, 42, run_ready, _data_);
-       return FALSE;
        _state_3:
-       _data_->_tmp5_ = test_test_int_finish (_data_->_tmp3_, _data_->_res_, &_data_->_tmp4_, 
&_data_->_inner_error0_);
-       _data_->j = _data_->_tmp4_;
-       _data_->_tmp2_ = _data_->_tmp5_;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->test);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
+       {
+               _data_->_state_ = 4;
+               _data_->_tmp5_ = test_test_int_finish (_data_->_tmp3_, _data_->_res_, &_data_->_tmp4_, 
&_data_->_inner_error0_);
+               _data_->j = _data_->_tmp4_;
+               _data_->_tmp2_ = _data_->_tmp5_;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _g_object_unref0 (_data_->test);
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->k = _data_->_tmp2_;
+               _vala_assert (_data_->j == 23, "j == 23");
+               _vala_assert (_data_->k == 11, "k == 11");
+               _data_->_tmp7_ = _data_->test;
+               _data_->_tmp8_ = NULL;
+               test_test_string (_data_->_tmp7_, "hello", run_ready, _data_);
                return FALSE;
        }
-       _data_->k = _data_->_tmp2_;
-       _vala_assert (_data_->j == 23, "j == 23");
-       _vala_assert (_data_->k == 11, "k == 11");
-       _data_->_tmp7_ = _data_->test;
-       _data_->_tmp8_ = NULL;
-       _data_->_state_ = 4;
-       test_test_string (_data_->_tmp7_, "hello", run_ready, _data_);
-       return FALSE;
        _state_4:
-       _data_->_tmp9_ = test_test_string_finish (_data_->_tmp7_, _data_->_res_, &_data_->_tmp8_, 
&_data_->_inner_error0_);
-       _g_free0 (_data_->t);
-       _data_->t = _data_->_tmp8_;
-       _data_->_tmp6_ = _data_->_tmp9_;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+       {
+               _data_->_tmp9_ = test_test_string_finish (_data_->_tmp7_, _data_->_res_, &_data_->_tmp8_, 
&_data_->_inner_error0_);
+               _g_free0 (_data_->t);
+               _data_->t = _data_->_tmp8_;
+               _data_->_tmp6_ = _data_->_tmp9_;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _g_free0 (_data_->u);
+                       _g_free0 (_data_->t);
+                       _g_object_unref0 (_data_->test);
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp10_ = _data_->_tmp6_;
+               _data_->_tmp6_ = NULL;
+               _g_free0 (_data_->u);
+               _data_->u = _data_->_tmp10_;
+               _data_->_tmp11_ = _data_->t;
+               _vala_assert (g_strcmp0 (_data_->_tmp11_, "world") == 0, "t == \"world\"");
+               _data_->_tmp12_ = _data_->u;
+               _vala_assert (g_strcmp0 (_data_->_tmp12_, "vala") == 0, "u == \"vala\"");
+               _data_->_tmp13_ = main_loop;
+               g_main_loop_quit (_data_->_tmp13_);
+               _g_free0 (_data_->_tmp6_);
                _g_free0 (_data_->u);
                _g_free0 (_data_->t);
                _g_object_unref0 (_data_->test);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
+               }
                g_object_unref (_data_->_async_result);
                return FALSE;
        }
-       _data_->_tmp10_ = _data_->_tmp6_;
-       _data_->_tmp6_ = NULL;
-       _g_free0 (_data_->u);
-       _data_->u = _data_->_tmp10_;
-       _data_->_tmp11_ = _data_->t;
-       _vala_assert (g_strcmp0 (_data_->_tmp11_, "world") == 0, "t == \"world\"");
-       _data_->_tmp12_ = _data_->u;
-       _vala_assert (g_strcmp0 (_data_->_tmp12_, "vala") == 0, "u == \"vala\"");
-       _data_->_tmp13_ = main_loop;
-       g_main_loop_quit (_data_->_tmp13_);
-       _g_free0 (_data_->_tmp6_);
-       _g_free0 (_data_->u);
-       _g_free0 (_data_->t);
-       _g_object_unref0 (_data_->test);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/dbus/async_server.c-expected b/tests/dbus/async_server.c-expected
index 81a1ee80b..41883d6a1 100644
--- a/tests/dbus/async_server.c-expected
+++ b/tests/dbus/async_server.c-expected
@@ -279,19 +279,23 @@ test_test_void_co (TestTestVoidData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_void_co_gsource_func, _data_, NULL);
-       _data_->_state_ = 1;
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_void_co_gsource_func, _data_, NULL);
+               return FALSE;
+       }
        _state_1:
-       ;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               ;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -356,22 +360,26 @@ test_test_int_co (TestTestIntData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _vala_assert (_data_->i == 42, "i == 42");
-       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_int_co_gsource_func, _data_, NULL);
-       _data_->_state_ = 1;
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               _vala_assert (_data_->i == 42, "i == 42");
+               g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_int_co_gsource_func, _data_, NULL);
+               return FALSE;
+       }
        _state_1:
-       ;
-       _data_->j = 23;
-       _data_->result = 11;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               ;
+               _data_->j = 23;
+               _data_->result = 11;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -446,25 +454,29 @@ test_test_string_co (TestTestStringData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _vala_assert (g_strcmp0 (_data_->s, "hello") == 0, "s == \"hello\"");
-       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_string_co_gsource_func, _data_, NULL);
-       _data_->_state_ = 1;
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               _vala_assert (g_strcmp0 (_data_->s, "hello") == 0, "s == \"hello\"");
+               g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_string_co_gsource_func, _data_, NULL);
+               return FALSE;
+       }
        _state_1:
-       ;
-       _data_->_tmp0_ = g_strdup ("world");
-       _g_free0 (_data_->t);
-       _data_->t = _data_->_tmp0_;
-       _data_->_tmp1_ = g_strdup ("vala");
-       _data_->result = _data_->_tmp1_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               ;
+               _data_->_tmp0_ = g_strdup ("world");
+               _g_free0 (_data_->t);
+               _data_->t = _data_->_tmp0_;
+               _data_->_tmp1_ = g_strdup ("vala");
+               _data_->result = _data_->_tmp1_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Test*
diff --git a/tests/dbus/bug783002_client.c-expected b/tests/dbus/bug783002_client.c-expected
index 3c3aedfcd..69000c6eb 100644
--- a/tests/dbus/bug783002_client.c-expected
+++ b/tests/dbus/bug783002_client.c-expected
@@ -553,57 +553,63 @@ run_co (RunData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       g_async_initable_new_async (TYPE_TEST_PROXY, 0, NULL, run_ready, _data_, "g-flags", 0, "g-name", 
"org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/test", 
"g-interface-name", "org.example.Test", NULL);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               g_async_initable_new_async (TYPE_TEST_PROXY, 0, NULL, run_ready, _data_, "g-flags", 0, 
"g-name", "org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/test", 
"g-interface-name", "org.example.Test", NULL);
+               return FALSE;
+       }
        _state_1:
-       _data_->_tmp0_ = (Test*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, 
_data_->_res_, &_data_->_inner_error0_);
-       _data_->test = (Test*) _data_->_tmp0_;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
+       {
+               _data_->_state_ = 2;
+               _data_->_tmp0_ = (Test*) g_async_initable_new_finish ((GAsyncInitable *) 
_data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
+               _data_->test = (Test*) _data_->_tmp0_;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp1_ = _data_->test;
+               _data_->_tmp2_ = g_strdup ("Badger");
+               _data_->_tmp3_ = g_strdup ("Snake");
+               _data_->_tmp4_ = g_strdup ("Mushroom");
+               _data_->_tmp5_ = g_new0 (gchar*, 3 + 1);
+               _data_->_tmp5_[0] = _data_->_tmp2_;
+               _data_->_tmp5_[1] = _data_->_tmp3_;
+               _data_->_tmp5_[2] = _data_->_tmp4_;
+               _data_->_tmp6_ = _data_->_tmp5_;
+               _data_->_tmp6__length1 = 3;
+               test_test_array_lifetime (_data_->_tmp1_, _data_->_tmp6_, (gint) 3, run_ready, _data_);
                return FALSE;
        }
-       _data_->_tmp1_ = _data_->test;
-       _data_->_tmp2_ = g_strdup ("Badger");
-       _data_->_tmp3_ = g_strdup ("Snake");
-       _data_->_tmp4_ = g_strdup ("Mushroom");
-       _data_->_tmp5_ = g_new0 (gchar*, 3 + 1);
-       _data_->_tmp5_[0] = _data_->_tmp2_;
-       _data_->_tmp5_[1] = _data_->_tmp3_;
-       _data_->_tmp5_[2] = _data_->_tmp4_;
-       _data_->_tmp6_ = _data_->_tmp5_;
-       _data_->_tmp6__length1 = 3;
-       _data_->_state_ = 2;
-       test_test_array_lifetime (_data_->_tmp1_, _data_->_tmp6_, (gint) 3, run_ready, _data_);
-       return FALSE;
        _state_2:
-       _data_->_tmp7_ = test_test_array_lifetime_finish (_data_->_tmp1_, _data_->_res_, 
&_data_->_inner_error0_);
-       _data_->_tmp8_ = _data_->_tmp7_;
-       _data_->_tmp6_ = (_vala_array_free (_data_->_tmp6_, _data_->_tmp6__length1, (GDestroyNotify) g_free), 
NULL);
-       _data_->_result_ = _data_->_tmp8_;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+       {
+               _data_->_tmp7_ = test_test_array_lifetime_finish (_data_->_tmp1_, _data_->_res_, 
&_data_->_inner_error0_);
+               _data_->_tmp8_ = _data_->_tmp7_;
+               _data_->_tmp6_ = (_vala_array_free (_data_->_tmp6_, _data_->_tmp6__length1, (GDestroyNotify) 
g_free), NULL);
+               _data_->_result_ = _data_->_tmp8_;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _g_object_unref0 (_data_->test);
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp9_ = _data_->_result_;
+               _vala_assert (g_strcmp0 (_data_->_tmp9_, "BadgerSnakeMushroom") == 0, "result == 
\"BadgerSnakeMushroom\"");
+               _data_->_tmp10_ = main_loop;
+               g_main_loop_quit (_data_->_tmp10_);
+               _g_free0 (_data_->_result_);
                _g_object_unref0 (_data_->test);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
+               }
                g_object_unref (_data_->_async_result);
                return FALSE;
        }
-       _data_->_tmp9_ = _data_->_result_;
-       _vala_assert (g_strcmp0 (_data_->_tmp9_, "BadgerSnakeMushroom") == 0, "result == 
\"BadgerSnakeMushroom\"");
-       _data_->_tmp10_ = main_loop;
-       g_main_loop_quit (_data_->_tmp10_);
-       _g_free0 (_data_->_result_);
-       _g_object_unref0 (_data_->test);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/dbus/bug783002_server.c-expected b/tests/dbus/bug783002_server.c-expected
index 679154f0f..18189e96f 100644
--- a/tests/dbus/bug783002_server.c-expected
+++ b/tests/dbus/bug783002_server.c-expected
@@ -278,51 +278,55 @@ test_test_array_lifetime_co (TestTestArrayLifetimeData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_data1_ = g_slice_new0 (Block1Data);
-       _data_->_data1_->_ref_count_ = 1;
-       _data_->_data1_->self = g_object_ref (_data_->self);
-       _data_->_data1_->_async_data_ = _data_;
-       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda4__gsource_func, block1_data_ref 
(_data_->_data1_), block1_data_unref);
-       _data_->_state_ = 1;
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               _data_->_data1_ = g_slice_new0 (Block1Data);
+               _data_->_data1_->_ref_count_ = 1;
+               _data_->_data1_->self = g_object_ref (_data_->self);
+               _data_->_data1_->_async_data_ = _data_;
+               g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda4__gsource_func, block1_data_ref 
(_data_->_data1_), block1_data_unref);
+               return FALSE;
+       }
        _state_1:
-       ;
-       _data_->_tmp0_ = g_string_new ("");
-       _data_->_result_ = _data_->_tmp0_;
        {
-               _data_->item_collection_length1 = 0;
-               _data_->_item_collection_size_ = 0;
-               _data_->item_collection = _data_->items;
-               _data_->item_collection_length1 = _data_->items_length1;
-               for (_data_->item_it = 0; _data_->item_it < _data_->item_collection_length1; _data_->item_it 
= _data_->item_it + 1) {
-                       _data_->_tmp1_ = g_strdup (_data_->item_collection[_data_->item_it]);
-                       _data_->item = _data_->_tmp1_;
-                       {
-                               _data_->_tmp2_ = _data_->_result_;
-                               _data_->_tmp3_ = _data_->item;
-                               g_string_append (_data_->_tmp2_, _data_->_tmp3_);
-                               _g_free0 (_data_->item);
+               ;
+               _data_->_tmp0_ = g_string_new ("");
+               _data_->_result_ = _data_->_tmp0_;
+               {
+                       _data_->item_collection_length1 = 0;
+                       _data_->_item_collection_size_ = 0;
+                       _data_->item_collection = _data_->items;
+                       _data_->item_collection_length1 = _data_->items_length1;
+                       for (_data_->item_it = 0; _data_->item_it < _data_->item_collection_length1; 
_data_->item_it = _data_->item_it + 1) {
+                               _data_->_tmp1_ = g_strdup (_data_->item_collection[_data_->item_it]);
+                               _data_->item = _data_->_tmp1_;
+                               {
+                                       _data_->_tmp2_ = _data_->_result_;
+                                       _data_->_tmp3_ = _data_->item;
+                                       g_string_append (_data_->_tmp2_, _data_->_tmp3_);
+                                       _g_free0 (_data_->item);
+                               }
                        }
                }
-       }
-       _data_->_tmp4_ = _data_->_result_;
-       _data_->_tmp5_ = _data_->_tmp4_->str;
-       _vala_assert (g_strcmp0 (_data_->_tmp5_, "BadgerSnakeMushroom") == 0, "result.str == 
\"BadgerSnakeMushroom\"");
-       _data_->_tmp6_ = _data_->_result_;
-       _data_->_tmp7_ = _data_->_tmp6_->str;
-       _data_->_tmp8_ = g_strdup (_data_->_tmp7_);
-       _data_->result = _data_->_tmp8_;
-       _g_string_free0 (_data_->_result_);
-       block1_data_unref (_data_->_data1_);
-       _data_->_data1_ = NULL;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+               _data_->_tmp4_ = _data_->_result_;
+               _data_->_tmp5_ = _data_->_tmp4_->str;
+               _vala_assert (g_strcmp0 (_data_->_tmp5_, "BadgerSnakeMushroom") == 0, "result.str == 
\"BadgerSnakeMushroom\"");
+               _data_->_tmp6_ = _data_->_result_;
+               _data_->_tmp7_ = _data_->_tmp6_->str;
+               _data_->_tmp8_ = g_strdup (_data_->_tmp7_);
+               _data_->result = _data_->_tmp8_;
+               _g_string_free0 (_data_->_result_);
+               block1_data_unref (_data_->_data1_);
+               _data_->_data1_ = NULL;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Test*
diff --git a/tests/dbus/dynamic-method_client.c-expected b/tests/dbus/dynamic-method_client.c-expected
index d06bec69d..4a34c4034 100644
--- a/tests/dbus/dynamic-method_client.c-expected
+++ b/tests/dbus/dynamic-method_client.c-expected
@@ -162,69 +162,75 @@ run_co (RunData* _data_)
        }
        _state_0:
        {
-               _data_->_state_ = 1;
-               g_bus_get (G_BUS_TYPE_SESSION, NULL, run_ready, _data_);
-               return FALSE;
-               _state_1:
-               _data_->_tmp0_ = g_bus_get_finish (_data_->_res_, &_data_->_inner_error0_);
-               _data_->bus = _data_->_tmp0_;
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       goto __catch0_g_error;
-               }
-               _data_->_tmp1_ = _data_->bus;
-               _data_->_tmp2_ = _data_->bus;
-               _data_->_tmp3_ = g_dbus_connection_get_unique_name (_data_->_tmp2_);
-               _data_->_state_ = 2;
-               g_dbus_proxy_new (_data_->_tmp1_, G_DBUS_PROXY_FLAGS_NONE, NULL, _data_->_tmp3_, 
"/org/example/test", "org.example.Test", NULL, run_ready, _data_);
-               return FALSE;
-               _state_2:
-               _data_->_tmp4_ = g_dbus_proxy_new_finish (_data_->_res_, &_data_->_inner_error0_);
-               _data_->test = _data_->_tmp4_;
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       _g_object_unref0 (_data_->bus);
-                       goto __catch0_g_error;
-               }
-               _data_->_tmp5_ = _data_->test;
-               _data_->_tmp10_ = NULL;
-               _data_->_tmp11_ = _dynamic_do_foo0 (_data_->_tmp5_, 42, &_data_->_tmp10_, 
&_data_->_inner_error0_);
-               _g_free0 (_data_->s);
-               _data_->s = _data_->_tmp10_;
-               _data_->i = _data_->_tmp11_;
-               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-                       _g_free0 (_data_->s);
-                       _g_object_unref0 (_data_->test);
-                       _g_object_unref0 (_data_->bus);
-                       goto __catch0_g_error;
-               }
-               _vala_assert (_data_->i == 23, "i == 23");
-               _data_->_tmp12_ = _data_->s;
-               _vala_assert (g_strcmp0 (_data_->_tmp12_, "foo") == 0, "s == \"foo\"");
-               _g_free0 (_data_->s);
-               _g_object_unref0 (_data_->test);
-               _g_object_unref0 (_data_->bus);
-       }
-       goto __finally0;
-       __catch0_g_error:
-       {
-               g_clear_error (&_data_->_inner_error0_);
-       }
-       __finally0:
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       _data_->_tmp13_ = main_loop;
-       g_main_loop_quit (_data_->_tmp13_);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+               {
+                       _data_->_state_ = 1;
+                       g_bus_get (G_BUS_TYPE_SESSION, NULL, run_ready, _data_);
+                       return FALSE;
+                       _state_1:
+                       {
+                               _data_->_state_ = 2;
+                               _data_->_tmp0_ = g_bus_get_finish (_data_->_res_, &_data_->_inner_error0_);
+                               _data_->bus = _data_->_tmp0_;
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       goto __catch0_g_error;
+                               }
+                               _data_->_tmp1_ = _data_->bus;
+                               _data_->_tmp2_ = _data_->bus;
+                               _data_->_tmp3_ = g_dbus_connection_get_unique_name (_data_->_tmp2_);
+                               g_dbus_proxy_new (_data_->_tmp1_, G_DBUS_PROXY_FLAGS_NONE, NULL, 
_data_->_tmp3_, "/org/example/test", "org.example.Test", NULL, run_ready, _data_);
+                               return FALSE;
+                       }
+                       _state_2:
+                       {
+                               _data_->_tmp4_ = g_dbus_proxy_new_finish (_data_->_res_, 
&_data_->_inner_error0_);
+                               _data_->test = _data_->_tmp4_;
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       _g_object_unref0 (_data_->bus);
+                                       goto __catch0_g_error;
+                               }
+                               _data_->_tmp5_ = _data_->test;
+                               _data_->_tmp10_ = NULL;
+                               _data_->_tmp11_ = _dynamic_do_foo0 (_data_->_tmp5_, 42, &_data_->_tmp10_, 
&_data_->_inner_error0_);
+                               _g_free0 (_data_->s);
+                               _data_->s = _data_->_tmp10_;
+                               _data_->i = _data_->_tmp11_;
+                               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                                       _g_free0 (_data_->s);
+                                       _g_object_unref0 (_data_->test);
+                                       _g_object_unref0 (_data_->bus);
+                                       goto __catch0_g_error;
+                               }
+                               _vala_assert (_data_->i == 23, "i == 23");
+                               _data_->_tmp12_ = _data_->s;
+                               _vala_assert (g_strcmp0 (_data_->_tmp12_, "foo") == 0, "s == \"foo\"");
+                               _g_free0 (_data_->s);
+                               _g_object_unref0 (_data_->test);
+                               _g_object_unref0 (_data_->bus);
+                       }
+                       goto __finally0;
+                       __catch0_g_error:
+                       {
+                               g_clear_error (&_data_->_inner_error0_);
+                       }
+                       __finally0:
+                       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                               g_clear_error (&_data_->_inner_error0_);
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
+                       }
+                       _data_->_tmp13_ = main_loop;
+                       g_main_loop_quit (_data_->_tmp13_);
+                       g_task_return_pointer (_data_->_async_result, _data_, NULL);
+                       if (_data_->_state_ != 0) {
+                               while (!g_task_get_completed (_data_->_async_result)) {
+                                       g_main_context_iteration (g_task_get_context (_data_->_async_result), 
TRUE);
+                               }
+                       }
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
                }
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/dbus/filedescriptor-async_client.c-expected 
b/tests/dbus/filedescriptor-async_client.c-expected
index 9d6f2262a..487a3bd51 100644
--- a/tests/dbus/filedescriptor-async_client.c-expected
+++ b/tests/dbus/filedescriptor-async_client.c-expected
@@ -587,132 +587,138 @@ run_co (RunData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       g_async_initable_new_async (TYPE_TEST_PROXY, 0, NULL, run_ready, _data_, "g-flags", 0, "g-name", 
"org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/test", 
"g-interface-name", "org.example.Test", NULL);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               g_async_initable_new_async (TYPE_TEST_PROXY, 0, NULL, run_ready, _data_, "g-flags", 0, 
"g-name", "org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/test", 
"g-interface-name", "org.example.Test", NULL);
+               return FALSE;
+       }
        _state_1:
-       _data_->_tmp0_ = (Test*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, 
_data_->_res_, &_data_->_inner_error0_);
-       _data_->test = (Test*) _data_->_tmp0_;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
+       {
+               _data_->_state_ = 2;
+               _data_->_tmp0_ = (Test*) g_async_initable_new_finish ((GAsyncInitable *) 
_data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
+               _data_->test = (Test*) _data_->_tmp0_;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp1_ = g_new0 (guint8, 1);
+               _data_->buffer = _data_->_tmp1_;
+               _data_->buffer_length1 = 1;
+               _data_->_buffer_size_ = _data_->buffer_length1;
+               _data_->_tmp2_ = g_new0 (gint, 2);
+               _data_->pipe1 = _data_->_tmp2_;
+               _data_->pipe1_length1 = 2;
+               _data_->_pipe1_size_ = _data_->pipe1_length1;
+               _data_->_tmp3_ = _data_->pipe1;
+               _data_->_tmp3__length1 = _data_->pipe1_length1;
+               _vala_assert (pipe (_data_->_tmp3_) == 0, "Posix.pipe (pipe1) == 0");
+               _data_->_tmp4_ = _data_->buffer;
+               _data_->_tmp4__length1 = _data_->buffer_length1;
+               _data_->_tmp4_[0] = (guint8) 42;
+               _data_->_tmp5_ = _data_->pipe1;
+               _data_->_tmp5__length1 = _data_->pipe1_length1;
+               _data_->_tmp6_ = _data_->_tmp5_[1];
+               _data_->_tmp7_ = _data_->buffer;
+               _data_->_tmp7__length1 = _data_->buffer_length1;
+               _vala_assert (write (_data_->_tmp6_, _data_->_tmp7_, (gsize) 1) == ((gssize) 1), "Posix.write 
(pipe1[1], buffer, 1) == 1");
+               _data_->_tmp8_ = _data_->pipe1;
+               _data_->_tmp8__length1 = _data_->pipe1_length1;
+               _data_->_tmp9_ = _data_->_tmp8_[1];
+               close (_data_->_tmp9_);
+               _data_->_tmp11_ = _data_->test;
+               _data_->_tmp12_ = _data_->pipe1;
+               _data_->_tmp12__length1 = _data_->pipe1_length1;
+               _data_->_tmp13_ = _data_->_tmp12_[0];
+               _data_->_tmp14_ = (GUnixInputStream*) g_unix_input_stream_new (_data_->_tmp13_, TRUE);
+               _data_->_tmp15_ = _data_->_tmp14_;
+               _data_->_tmp16_ = NULL;
+               test_test_in (_data_->_tmp11_, _data_->_tmp15_, run_ready, _data_);
                return FALSE;
        }
-       _data_->_tmp1_ = g_new0 (guint8, 1);
-       _data_->buffer = _data_->_tmp1_;
-       _data_->buffer_length1 = 1;
-       _data_->_buffer_size_ = _data_->buffer_length1;
-       _data_->_tmp2_ = g_new0 (gint, 2);
-       _data_->pipe1 = _data_->_tmp2_;
-       _data_->pipe1_length1 = 2;
-       _data_->_pipe1_size_ = _data_->pipe1_length1;
-       _data_->_tmp3_ = _data_->pipe1;
-       _data_->_tmp3__length1 = _data_->pipe1_length1;
-       _vala_assert (pipe (_data_->_tmp3_) == 0, "Posix.pipe (pipe1) == 0");
-       _data_->_tmp4_ = _data_->buffer;
-       _data_->_tmp4__length1 = _data_->buffer_length1;
-       _data_->_tmp4_[0] = (guint8) 42;
-       _data_->_tmp5_ = _data_->pipe1;
-       _data_->_tmp5__length1 = _data_->pipe1_length1;
-       _data_->_tmp6_ = _data_->_tmp5_[1];
-       _data_->_tmp7_ = _data_->buffer;
-       _data_->_tmp7__length1 = _data_->buffer_length1;
-       _vala_assert (write (_data_->_tmp6_, _data_->_tmp7_, (gsize) 1) == ((gssize) 1), "Posix.write 
(pipe1[1], buffer, 1) == 1");
-       _data_->_tmp8_ = _data_->pipe1;
-       _data_->_tmp8__length1 = _data_->pipe1_length1;
-       _data_->_tmp9_ = _data_->_tmp8_[1];
-       close (_data_->_tmp9_);
-       _data_->_tmp11_ = _data_->test;
-       _data_->_tmp12_ = _data_->pipe1;
-       _data_->_tmp12__length1 = _data_->pipe1_length1;
-       _data_->_tmp13_ = _data_->_tmp12_[0];
-       _data_->_tmp14_ = (GUnixInputStream*) g_unix_input_stream_new (_data_->_tmp13_, TRUE);
-       _data_->_tmp15_ = _data_->_tmp14_;
-       _data_->_tmp16_ = NULL;
-       _data_->_state_ = 2;
-       test_test_in (_data_->_tmp11_, _data_->_tmp15_, run_ready, _data_);
-       return FALSE;
        _state_2:
-       _data_->_tmp17_ = test_test_in_finish (_data_->_tmp11_, _data_->_res_, &_data_->_tmp16_, 
&_data_->_inner_error0_);
-       _g_object_unref0 (_data_->j);
-       _data_->j = _data_->_tmp16_;
-       _data_->_tmp18_ = _data_->_tmp17_;
-       _g_object_unref0 (_data_->_tmp15_);
-       _data_->_tmp10_ = _data_->_tmp18_;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->k);
+       {
+               _data_->_tmp17_ = test_test_in_finish (_data_->_tmp11_, _data_->_res_, &_data_->_tmp16_, 
&_data_->_inner_error0_);
                _g_object_unref0 (_data_->j);
-               _data_->pipe1 = (g_free (_data_->pipe1), NULL);
-               _data_->buffer = (g_free (_data_->buffer), NULL);
-               _g_object_unref0 (_data_->test);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       _data_->_tmp19_ = _data_->_tmp10_;
-       _data_->_tmp10_ = NULL;
-       _g_object_unref0 (_data_->k);
-       _data_->k = _data_->_tmp19_;
-       _data_->_tmp21_ = _data_->j;
-       _data_->_tmp22_ = _data_->buffer;
-       _data_->_tmp22__length1 = _data_->buffer_length1;
-       _data_->_tmp20_ = g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp21_, 
g_input_stream_get_type (), GInputStream), _data_->_tmp22_, (gsize) _data_->_tmp22__length1, NULL, 
&_data_->_inner_error0_);
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->_tmp10_);
+               _data_->j = _data_->_tmp16_;
+               _data_->_tmp18_ = _data_->_tmp17_;
+               _g_object_unref0 (_data_->_tmp15_);
+               _data_->_tmp10_ = _data_->_tmp18_;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _g_object_unref0 (_data_->k);
+                       _g_object_unref0 (_data_->j);
+                       _data_->pipe1 = (g_free (_data_->pipe1), NULL);
+                       _data_->buffer = (g_free (_data_->buffer), NULL);
+                       _g_object_unref0 (_data_->test);
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp19_ = _data_->_tmp10_;
+               _data_->_tmp10_ = NULL;
                _g_object_unref0 (_data_->k);
-               _g_object_unref0 (_data_->j);
-               _data_->pipe1 = (g_free (_data_->pipe1), NULL);
-               _data_->buffer = (g_free (_data_->buffer), NULL);
-               _g_object_unref0 (_data_->test);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       _vala_assert (_data_->_tmp20_ == ((gssize) 1), "j.read (buffer) == 1");
-       _data_->_tmp23_ = _data_->buffer;
-       _data_->_tmp23__length1 = _data_->buffer_length1;
-       _data_->_tmp24_ = _data_->_tmp23_[0];
-       _vala_assert (((gint) _data_->_tmp24_) == 23, "buffer[0] == 23");
-       _data_->_tmp26_ = _data_->k;
-       _data_->_tmp27_ = _data_->buffer;
-       _data_->_tmp27__length1 = _data_->buffer_length1;
-       _data_->_tmp25_ = g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp26_, 
g_input_stream_get_type (), GInputStream), _data_->_tmp27_, (gsize) _data_->_tmp27__length1, NULL, 
&_data_->_inner_error0_);
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+               _data_->k = _data_->_tmp19_;
+               _data_->_tmp21_ = _data_->j;
+               _data_->_tmp22_ = _data_->buffer;
+               _data_->_tmp22__length1 = _data_->buffer_length1;
+               _data_->_tmp20_ = g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp21_, 
g_input_stream_get_type (), GInputStream), _data_->_tmp22_, (gsize) _data_->_tmp22__length1, NULL, 
&_data_->_inner_error0_);
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _g_object_unref0 (_data_->_tmp10_);
+                       _g_object_unref0 (_data_->k);
+                       _g_object_unref0 (_data_->j);
+                       _data_->pipe1 = (g_free (_data_->pipe1), NULL);
+                       _data_->buffer = (g_free (_data_->buffer), NULL);
+                       _g_object_unref0 (_data_->test);
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _vala_assert (_data_->_tmp20_ == ((gssize) 1), "j.read (buffer) == 1");
+               _data_->_tmp23_ = _data_->buffer;
+               _data_->_tmp23__length1 = _data_->buffer_length1;
+               _data_->_tmp24_ = _data_->_tmp23_[0];
+               _vala_assert (((gint) _data_->_tmp24_) == 23, "buffer[0] == 23");
+               _data_->_tmp26_ = _data_->k;
+               _data_->_tmp27_ = _data_->buffer;
+               _data_->_tmp27__length1 = _data_->buffer_length1;
+               _data_->_tmp25_ = g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp26_, 
g_input_stream_get_type (), GInputStream), _data_->_tmp27_, (gsize) _data_->_tmp27__length1, NULL, 
&_data_->_inner_error0_);
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _g_object_unref0 (_data_->_tmp10_);
+                       _g_object_unref0 (_data_->k);
+                       _g_object_unref0 (_data_->j);
+                       _data_->pipe1 = (g_free (_data_->pipe1), NULL);
+                       _data_->buffer = (g_free (_data_->buffer), NULL);
+                       _g_object_unref0 (_data_->test);
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _vala_assert (_data_->_tmp25_ == ((gssize) 1), "k.read (buffer) == 1");
+               _data_->_tmp28_ = _data_->buffer;
+               _data_->_tmp28__length1 = _data_->buffer_length1;
+               _data_->_tmp29_ = _data_->_tmp28_[0];
+               _vala_assert (((gint) _data_->_tmp29_) == 11, "buffer[0] == 11");
+               _data_->_tmp30_ = main_loop;
+               g_main_loop_quit (_data_->_tmp30_);
                _g_object_unref0 (_data_->_tmp10_);
                _g_object_unref0 (_data_->k);
                _g_object_unref0 (_data_->j);
                _data_->pipe1 = (g_free (_data_->pipe1), NULL);
                _data_->buffer = (g_free (_data_->buffer), NULL);
                _g_object_unref0 (_data_->test);
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
+               }
                g_object_unref (_data_->_async_result);
                return FALSE;
        }
-       _vala_assert (_data_->_tmp25_ == ((gssize) 1), "k.read (buffer) == 1");
-       _data_->_tmp28_ = _data_->buffer;
-       _data_->_tmp28__length1 = _data_->buffer_length1;
-       _data_->_tmp29_ = _data_->_tmp28_[0];
-       _vala_assert (((gint) _data_->_tmp29_) == 11, "buffer[0] == 11");
-       _data_->_tmp30_ = main_loop;
-       g_main_loop_quit (_data_->_tmp30_);
-       _g_object_unref0 (_data_->_tmp10_);
-       _g_object_unref0 (_data_->k);
-       _g_object_unref0 (_data_->j);
-       _data_->pipe1 = (g_free (_data_->pipe1), NULL);
-       _data_->buffer = (g_free (_data_->buffer), NULL);
-       _g_object_unref0 (_data_->test);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/dbus/filedescriptor-async_server.c-expected 
b/tests/dbus/filedescriptor-async_server.c-expected
index 5c9aa9720..99c3f00a5 100644
--- a/tests/dbus/filedescriptor-async_server.c-expected
+++ b/tests/dbus/filedescriptor-async_server.c-expected
@@ -271,89 +271,93 @@ test_test_in_co (TestTestInData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = g_new0 (guint8, 1);
-       _data_->buffer = _data_->_tmp0_;
-       _data_->buffer_length1 = 1;
-       _data_->_buffer_size_ = _data_->buffer_length1;
-       _data_->_tmp1_ = g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_data_->i, g_input_stream_get_type 
(), GInputStream), _data_->buffer, (gsize) _data_->buffer_length1, NULL, &_data_->_inner_error0_);
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               if (_data_->_inner_error0_->domain == G_IO_ERROR) {
-                       g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
-                       _data_->buffer = (g_free (_data_->buffer), NULL);
-                       _g_object_unref0 (_data_->j);
-                       g_object_unref (_data_->_async_result);
-                       return FALSE;
-               } else {
-                       _data_->buffer = (g_free (_data_->buffer), NULL);
-                       _g_object_unref0 (_data_->j);
-                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-                       g_clear_error (&_data_->_inner_error0_);
-                       g_object_unref (_data_->_async_result);
-                       return FALSE;
+       {
+               _data_->_state_ = 1;
+               _data_->_tmp0_ = g_new0 (guint8, 1);
+               _data_->buffer = _data_->_tmp0_;
+               _data_->buffer_length1 = 1;
+               _data_->_buffer_size_ = _data_->buffer_length1;
+               _data_->_tmp1_ = g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_data_->i, 
g_input_stream_get_type (), GInputStream), _data_->buffer, (gsize) _data_->buffer_length1, NULL, 
&_data_->_inner_error0_);
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       if (_data_->_inner_error0_->domain == G_IO_ERROR) {
+                               g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
+                               _data_->buffer = (g_free (_data_->buffer), NULL);
+                               _g_object_unref0 (_data_->j);
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
+                       } else {
+                               _data_->buffer = (g_free (_data_->buffer), NULL);
+                               _g_object_unref0 (_data_->j);
+                               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, 
__LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                               g_clear_error (&_data_->_inner_error0_);
+                               g_object_unref (_data_->_async_result);
+                               return FALSE;
+                       }
                }
+               _vala_assert (_data_->_tmp1_ == ((gssize) 1), "i.read (buffer) == 1");
+               _data_->_tmp2_ = _data_->buffer[0];
+               _vala_assert (((gint) _data_->_tmp2_) == 42, "buffer[0] == 42");
+               _data_->_tmp3_ = g_new0 (gint, 2);
+               _data_->pipe1 = _data_->_tmp3_;
+               _data_->pipe1_length1 = 2;
+               _data_->_pipe1_size_ = _data_->pipe1_length1;
+               _data_->_tmp4_ = _data_->pipe1;
+               _data_->_tmp4__length1 = _data_->pipe1_length1;
+               _vala_assert (pipe (_data_->_tmp4_) == 0, "Posix.pipe (pipe1) == 0");
+               _data_->buffer[0] = (guint8) 23;
+               _data_->_tmp5_ = _data_->pipe1;
+               _data_->_tmp5__length1 = _data_->pipe1_length1;
+               _data_->_tmp6_ = _data_->_tmp5_[1];
+               _vala_assert (write (_data_->_tmp6_, _data_->buffer, (gsize) 1) == ((gssize) 1), "Posix.write 
(pipe1[1], buffer, 1) == 1");
+               _data_->_tmp7_ = _data_->pipe1;
+               _data_->_tmp7__length1 = _data_->pipe1_length1;
+               _data_->_tmp8_ = _data_->_tmp7_[1];
+               close (_data_->_tmp8_);
+               _data_->_tmp9_ = g_new0 (gint, 2);
+               _data_->pipe2 = _data_->_tmp9_;
+               _data_->pipe2_length1 = 2;
+               _data_->_pipe2_size_ = _data_->pipe2_length1;
+               _data_->_tmp10_ = _data_->pipe2;
+               _data_->_tmp10__length1 = _data_->pipe2_length1;
+               _vala_assert (pipe (_data_->_tmp10_) == 0, "Posix.pipe (pipe2) == 0");
+               _data_->buffer[0] = (guint8) 11;
+               _data_->_tmp11_ = _data_->pipe2;
+               _data_->_tmp11__length1 = _data_->pipe2_length1;
+               _data_->_tmp12_ = _data_->_tmp11_[1];
+               _vala_assert (write (_data_->_tmp12_, _data_->buffer, (gsize) 1) == ((gssize) 1), 
"Posix.write (pipe2[1], buffer, 1) == 1");
+               _data_->_tmp13_ = _data_->pipe2;
+               _data_->_tmp13__length1 = _data_->pipe2_length1;
+               _data_->_tmp14_ = _data_->_tmp13_[1];
+               close (_data_->_tmp14_);
+               g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_in_co_gsource_func, _data_, NULL);
+               return FALSE;
        }
-       _vala_assert (_data_->_tmp1_ == ((gssize) 1), "i.read (buffer) == 1");
-       _data_->_tmp2_ = _data_->buffer[0];
-       _vala_assert (((gint) _data_->_tmp2_) == 42, "buffer[0] == 42");
-       _data_->_tmp3_ = g_new0 (gint, 2);
-       _data_->pipe1 = _data_->_tmp3_;
-       _data_->pipe1_length1 = 2;
-       _data_->_pipe1_size_ = _data_->pipe1_length1;
-       _data_->_tmp4_ = _data_->pipe1;
-       _data_->_tmp4__length1 = _data_->pipe1_length1;
-       _vala_assert (pipe (_data_->_tmp4_) == 0, "Posix.pipe (pipe1) == 0");
-       _data_->buffer[0] = (guint8) 23;
-       _data_->_tmp5_ = _data_->pipe1;
-       _data_->_tmp5__length1 = _data_->pipe1_length1;
-       _data_->_tmp6_ = _data_->_tmp5_[1];
-       _vala_assert (write (_data_->_tmp6_, _data_->buffer, (gsize) 1) == ((gssize) 1), "Posix.write 
(pipe1[1], buffer, 1) == 1");
-       _data_->_tmp7_ = _data_->pipe1;
-       _data_->_tmp7__length1 = _data_->pipe1_length1;
-       _data_->_tmp8_ = _data_->_tmp7_[1];
-       close (_data_->_tmp8_);
-       _data_->_tmp9_ = g_new0 (gint, 2);
-       _data_->pipe2 = _data_->_tmp9_;
-       _data_->pipe2_length1 = 2;
-       _data_->_pipe2_size_ = _data_->pipe2_length1;
-       _data_->_tmp10_ = _data_->pipe2;
-       _data_->_tmp10__length1 = _data_->pipe2_length1;
-       _vala_assert (pipe (_data_->_tmp10_) == 0, "Posix.pipe (pipe2) == 0");
-       _data_->buffer[0] = (guint8) 11;
-       _data_->_tmp11_ = _data_->pipe2;
-       _data_->_tmp11__length1 = _data_->pipe2_length1;
-       _data_->_tmp12_ = _data_->_tmp11_[1];
-       _vala_assert (write (_data_->_tmp12_, _data_->buffer, (gsize) 1) == ((gssize) 1), "Posix.write 
(pipe2[1], buffer, 1) == 1");
-       _data_->_tmp13_ = _data_->pipe2;
-       _data_->_tmp13__length1 = _data_->pipe2_length1;
-       _data_->_tmp14_ = _data_->_tmp13_[1];
-       close (_data_->_tmp14_);
-       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_test_in_co_gsource_func, _data_, NULL);
-       _data_->_state_ = 1;
-       return FALSE;
        _state_1:
-       ;
-       _data_->_tmp15_ = _data_->pipe1;
-       _data_->_tmp15__length1 = _data_->pipe1_length1;
-       _data_->_tmp16_ = _data_->_tmp15_[0];
-       _data_->_tmp17_ = (GUnixInputStream*) g_unix_input_stream_new (_data_->_tmp16_, TRUE);
-       _g_object_unref0 (_data_->j);
-       _data_->j = _data_->_tmp17_;
-       _data_->_tmp18_ = _data_->pipe2;
-       _data_->_tmp18__length1 = _data_->pipe2_length1;
-       _data_->_tmp19_ = _data_->_tmp18_[0];
-       _data_->_tmp20_ = (GUnixInputStream*) g_unix_input_stream_new (_data_->_tmp19_, TRUE);
-       _data_->result = _data_->_tmp20_;
-       _data_->pipe2 = (g_free (_data_->pipe2), NULL);
-       _data_->pipe1 = (g_free (_data_->pipe1), NULL);
-       _data_->buffer = (g_free (_data_->buffer), NULL);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               ;
+               _data_->_tmp15_ = _data_->pipe1;
+               _data_->_tmp15__length1 = _data_->pipe1_length1;
+               _data_->_tmp16_ = _data_->_tmp15_[0];
+               _data_->_tmp17_ = (GUnixInputStream*) g_unix_input_stream_new (_data_->_tmp16_, TRUE);
+               _g_object_unref0 (_data_->j);
+               _data_->j = _data_->_tmp17_;
+               _data_->_tmp18_ = _data_->pipe2;
+               _data_->_tmp18__length1 = _data_->pipe2_length1;
+               _data_->_tmp19_ = _data_->_tmp18_[0];
+               _data_->_tmp20_ = (GUnixInputStream*) g_unix_input_stream_new (_data_->_tmp19_, TRUE);
+               _data_->result = _data_->_tmp20_;
+               _data_->pipe2 = (g_free (_data_->pipe2), NULL);
+               _data_->pipe1 = (g_free (_data_->pipe1), NULL);
+               _data_->buffer = (g_free (_data_->buffer), NULL);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Test*
diff --git a/tests/dbus/no-reply_client.c-expected b/tests/dbus/no-reply_client.c-expected
index 19b35084b..bf35bca86 100644
--- a/tests/dbus/no-reply_client.c-expected
+++ b/tests/dbus/no-reply_client.c-expected
@@ -740,148 +740,152 @@ run_co (RunData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_data1_ = g_slice_new0 (Block1Data);
-       _data_->_data1_->_ref_count_ = 1;
-       _data_->_data1_->_async_data_ = _data_;
-       _data_->_state_ = 1;
-       g_async_initable_new_async (TYPE_TEST_PROXY, 0, NULL, run_ready, _data_, "g-flags", 0, "g-name", 
"org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/Test", 
"g-interface-name", "org.example.Test", NULL);
-       return FALSE;
-       _state_1:
-       _data_->_tmp0_ = (Test*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, 
_data_->_res_, &_data_->_inner_error0_);
-       _data_->test = (Test*) _data_->_tmp0_;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               block1_data_unref (_data_->_data1_);
-               _data_->_data1_ = NULL;
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       _data_->_tmp1_ = g_async_queue_new_full (_g_free0_);
-       _data_->_data1_->events = _data_->_tmp1_;
-       _data_->_tmp2_ = _data_->test;
-       g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp2_, g_dbus_proxy_get_type (), GDBusProxy), 
"g-connection", &_data_->_tmp3_, NULL);
-       _data_->_tmp4_ = _data_->_tmp3_;
-       _data_->connection = _data_->_tmp4_;
-       _data_->_tmp5_ = _data_->connection;
-       g_dbus_connection_add_filter (_data_->_tmp5_, ___lambda4__gd_bus_message_filter_function, 
block1_data_ref (_data_->_data1_), block1_data_unref);
-       _data_->_tmp6_ = _data_->test;
-       _data_->_tmp7_ = 0;
-       _data_->_tmp8_ = test_list_messages (_data_->_tmp6_, &_data_->_tmp7_, &_data_->_inner_error0_);
-       _data_->messages = _data_->_tmp8_;
-       _data_->messages_length1 = _data_->_tmp7_;
-       _data_->_messages_size_ = _data_->messages_length1;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _g_object_unref0 (_data_->connection);
-               _g_object_unref0 (_data_->test);
-               block1_data_unref (_data_->_data1_);
-               _data_->_data1_ = NULL;
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       _data_->_tmp9_ = _data_->messages;
-       _data_->_tmp9__length1 = _data_->messages_length1;
-       _vala_assert (_data_->_tmp9__length1 == 0, "messages.length == 0");
-       _data_->_tmp10_ = _data_->test;
-       test_post_message (_data_->_tmp10_, "round-trip", &_data_->_inner_error0_);
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
-               _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, 
(GDestroyNotify) g_free), NULL);
-               _g_object_unref0 (_data_->connection);
-               _g_object_unref0 (_data_->test);
-               block1_data_unref (_data_->_data1_);
-               _data_->_data1_ = NULL;
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
+       {
+               _data_->_data1_ = g_slice_new0 (Block1Data);
+               _data_->_data1_->_ref_count_ = 1;
+               _data_->_data1_->_async_data_ = _data_;
+               _data_->_state_ = 1;
+               g_async_initable_new_async (TYPE_TEST_PROXY, 0, NULL, run_ready, _data_, "g-flags", 0, 
"g-name", "org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/Test", 
"g-interface-name", "org.example.Test", NULL);
                return FALSE;
        }
-       _data_->_tmp11_ = _data_->_data1_->events;
-       _data_->_tmp12_ = g_async_queue_pop (_data_->_tmp11_);
-       _data_->_tmp13_ = (gchar*) _data_->_tmp12_;
-       _vala_assert (g_strcmp0 (_data_->_tmp13_, "G_DBUS_MESSAGE_FLAGS_NONE") == 0, "events.pop () == 
\"G_DBUS_MESSAGE_FLAGS_NONE\"");
-       _g_free0 (_data_->_tmp13_);
-       _data_->_tmp14_ = _data_->_data1_->events;
-       _data_->_tmp15_ = g_async_queue_try_pop (_data_->_tmp14_);
-       _data_->_tmp16_ = (gchar*) _data_->_tmp15_;
-       _vala_assert (_data_->_tmp16_ == NULL, "events.try_pop () == null");
-       _g_free0 (_data_->_tmp16_);
-       _data_->_tmp17_ = _data_->test;
-       test_post_message_no_reply (_data_->_tmp17_, "fire-and-forget", &_data_->_inner_error0_);
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+       _state_1:
+       {
+               _data_->_tmp0_ = (Test*) g_async_initable_new_finish ((GAsyncInitable *) 
_data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
+               _data_->test = (Test*) _data_->_tmp0_;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       block1_data_unref (_data_->_data1_);
+                       _data_->_data1_ = NULL;
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp1_ = g_async_queue_new_full (_g_free0_);
+               _data_->_data1_->events = _data_->_tmp1_;
+               _data_->_tmp2_ = _data_->test;
+               g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp2_, g_dbus_proxy_get_type (), 
GDBusProxy), "g-connection", &_data_->_tmp3_, NULL);
+               _data_->_tmp4_ = _data_->_tmp3_;
+               _data_->connection = _data_->_tmp4_;
+               _data_->_tmp5_ = _data_->connection;
+               g_dbus_connection_add_filter (_data_->_tmp5_, ___lambda4__gd_bus_message_filter_function, 
block1_data_ref (_data_->_data1_), block1_data_unref);
+               _data_->_tmp6_ = _data_->test;
+               _data_->_tmp7_ = 0;
+               _data_->_tmp8_ = test_list_messages (_data_->_tmp6_, &_data_->_tmp7_, 
&_data_->_inner_error0_);
+               _data_->messages = _data_->_tmp8_;
+               _data_->messages_length1 = _data_->_tmp7_;
+               _data_->_messages_size_ = _data_->messages_length1;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _g_object_unref0 (_data_->connection);
+                       _g_object_unref0 (_data_->test);
+                       block1_data_unref (_data_->_data1_);
+                       _data_->_data1_ = NULL;
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp9_ = _data_->messages;
+               _data_->_tmp9__length1 = _data_->messages_length1;
+               _vala_assert (_data_->_tmp9__length1 == 0, "messages.length == 0");
+               _data_->_tmp10_ = _data_->test;
+               test_post_message (_data_->_tmp10_, "round-trip", &_data_->_inner_error0_);
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, 
(GDestroyNotify) g_free), NULL);
+                       _g_object_unref0 (_data_->connection);
+                       _g_object_unref0 (_data_->test);
+                       block1_data_unref (_data_->_data1_);
+                       _data_->_data1_ = NULL;
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp11_ = _data_->_data1_->events;
+               _data_->_tmp12_ = g_async_queue_pop (_data_->_tmp11_);
+               _data_->_tmp13_ = (gchar*) _data_->_tmp12_;
+               _vala_assert (g_strcmp0 (_data_->_tmp13_, "G_DBUS_MESSAGE_FLAGS_NONE") == 0, "events.pop () 
== \"G_DBUS_MESSAGE_FLAGS_NONE\"");
+               _g_free0 (_data_->_tmp13_);
+               _data_->_tmp14_ = _data_->_data1_->events;
+               _data_->_tmp15_ = g_async_queue_try_pop (_data_->_tmp14_);
+               _data_->_tmp16_ = (gchar*) _data_->_tmp15_;
+               _vala_assert (_data_->_tmp16_ == NULL, "events.try_pop () == null");
+               _g_free0 (_data_->_tmp16_);
+               _data_->_tmp17_ = _data_->test;
+               test_post_message_no_reply (_data_->_tmp17_, "fire-and-forget", &_data_->_inner_error0_);
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, 
(GDestroyNotify) g_free), NULL);
+                       _g_object_unref0 (_data_->connection);
+                       _g_object_unref0 (_data_->test);
+                       block1_data_unref (_data_->_data1_);
+                       _data_->_data1_ = NULL;
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp18_ = _data_->_data1_->events;
+               _data_->_tmp19_ = g_async_queue_pop (_data_->_tmp18_);
+               _data_->_tmp20_ = (gchar*) _data_->_tmp19_;
+               _vala_assert (g_strcmp0 (_data_->_tmp20_, "G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED") == 0, 
"events.pop () == \"G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED\"");
+               _g_free0 (_data_->_tmp20_);
+               _data_->_tmp21_ = _data_->_data1_->events;
+               _data_->_tmp22_ = g_async_queue_try_pop (_data_->_tmp21_);
+               _data_->_tmp23_ = (gchar*) _data_->_tmp22_;
+               _vala_assert (_data_->_tmp23_ == NULL, "events.try_pop () == null");
+               _g_free0 (_data_->_tmp23_);
+               _data_->_tmp25_ = _data_->test;
+               _data_->_tmp26_ = 0;
+               _data_->_tmp27_ = test_list_messages (_data_->_tmp25_, &_data_->_tmp26_, 
&_data_->_inner_error0_);
+               _data_->_tmp24_ = _data_->_tmp27_;
+               _data_->_tmp24__length1 = _data_->_tmp26_;
+               _data_->__tmp24__size_ = _data_->_tmp24__length1;
+               if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+                       _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, 
(GDestroyNotify) g_free), NULL);
+                       _g_object_unref0 (_data_->connection);
+                       _g_object_unref0 (_data_->test);
+                       block1_data_unref (_data_->_data1_);
+                       _data_->_data1_ = NULL;
+                       g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
+                       g_clear_error (&_data_->_inner_error0_);
+                       g_object_unref (_data_->_async_result);
+                       return FALSE;
+               }
+               _data_->_tmp28_ = _data_->_tmp24_;
+               _data_->_tmp28__length1 = _data_->_tmp24__length1;
+               _data_->_tmp24_ = NULL;
+               _data_->_tmp24__length1 = 0;
                _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, 
(GDestroyNotify) g_free), NULL);
-               _g_object_unref0 (_data_->connection);
-               _g_object_unref0 (_data_->test);
-               block1_data_unref (_data_->_data1_);
-               _data_->_data1_ = NULL;
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
-               g_object_unref (_data_->_async_result);
-               return FALSE;
-       }
-       _data_->_tmp18_ = _data_->_data1_->events;
-       _data_->_tmp19_ = g_async_queue_pop (_data_->_tmp18_);
-       _data_->_tmp20_ = (gchar*) _data_->_tmp19_;
-       _vala_assert (g_strcmp0 (_data_->_tmp20_, "G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED") == 0, "events.pop 
() == \"G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED\"");
-       _g_free0 (_data_->_tmp20_);
-       _data_->_tmp21_ = _data_->_data1_->events;
-       _data_->_tmp22_ = g_async_queue_try_pop (_data_->_tmp21_);
-       _data_->_tmp23_ = (gchar*) _data_->_tmp22_;
-       _vala_assert (_data_->_tmp23_ == NULL, "events.try_pop () == null");
-       _g_free0 (_data_->_tmp23_);
-       _data_->_tmp25_ = _data_->test;
-       _data_->_tmp26_ = 0;
-       _data_->_tmp27_ = test_list_messages (_data_->_tmp25_, &_data_->_tmp26_, &_data_->_inner_error0_);
-       _data_->_tmp24_ = _data_->_tmp27_;
-       _data_->_tmp24__length1 = _data_->_tmp26_;
-       _data_->__tmp24__size_ = _data_->_tmp24__length1;
-       if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+               _data_->messages = _data_->_tmp28_;
+               _data_->messages_length1 = _data_->_tmp28__length1;
+               _data_->_messages_size_ = _data_->messages_length1;
+               _data_->_tmp29_ = _data_->messages;
+               _data_->_tmp29__length1 = _data_->messages_length1;
+               _vala_assert (_data_->_tmp29__length1 == 2, "messages.length == 2");
+               _data_->_tmp30_ = _data_->messages;
+               _data_->_tmp30__length1 = _data_->messages_length1;
+               _data_->_tmp31_ = _data_->_tmp30_[0];
+               _vala_assert (g_strcmp0 (_data_->_tmp31_, "round-trip") == 0, "messages[0] == 
\"round-trip\"");
+               _data_->_tmp32_ = _data_->messages;
+               _data_->_tmp32__length1 = _data_->messages_length1;
+               _data_->_tmp33_ = _data_->_tmp32_[1];
+               _vala_assert (g_strcmp0 (_data_->_tmp33_, "fire-and-forget") == 0, "messages[1] == 
\"fire-and-forget\"");
+               _data_->_tmp34_ = main_loop;
+               g_main_loop_quit (_data_->_tmp34_);
+               _data_->_tmp24_ = (_vala_array_free (_data_->_tmp24_, _data_->_tmp24__length1, 
(GDestroyNotify) g_free), NULL);
                _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, 
(GDestroyNotify) g_free), NULL);
                _g_object_unref0 (_data_->connection);
                _g_object_unref0 (_data_->test);
                block1_data_unref (_data_->_data1_);
                _data_->_data1_ = NULL;
-               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, 
_data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), 
_data_->_inner_error0_->code);
-               g_clear_error (&_data_->_inner_error0_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
+               }
                g_object_unref (_data_->_async_result);
                return FALSE;
        }
-       _data_->_tmp28_ = _data_->_tmp24_;
-       _data_->_tmp28__length1 = _data_->_tmp24__length1;
-       _data_->_tmp24_ = NULL;
-       _data_->_tmp24__length1 = 0;
-       _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, (GDestroyNotify) 
g_free), NULL);
-       _data_->messages = _data_->_tmp28_;
-       _data_->messages_length1 = _data_->_tmp28__length1;
-       _data_->_messages_size_ = _data_->messages_length1;
-       _data_->_tmp29_ = _data_->messages;
-       _data_->_tmp29__length1 = _data_->messages_length1;
-       _vala_assert (_data_->_tmp29__length1 == 2, "messages.length == 2");
-       _data_->_tmp30_ = _data_->messages;
-       _data_->_tmp30__length1 = _data_->messages_length1;
-       _data_->_tmp31_ = _data_->_tmp30_[0];
-       _vala_assert (g_strcmp0 (_data_->_tmp31_, "round-trip") == 0, "messages[0] == \"round-trip\"");
-       _data_->_tmp32_ = _data_->messages;
-       _data_->_tmp32__length1 = _data_->messages_length1;
-       _data_->_tmp33_ = _data_->_tmp32_[1];
-       _vala_assert (g_strcmp0 (_data_->_tmp33_, "fire-and-forget") == 0, "messages[1] == 
\"fire-and-forget\"");
-       _data_->_tmp34_ = main_loop;
-       g_main_loop_quit (_data_->_tmp34_);
-       _data_->_tmp24_ = (_vala_array_free (_data_->_tmp24_, _data_->_tmp24__length1, (GDestroyNotify) 
g_free), NULL);
-       _data_->messages = (_vala_array_free (_data_->messages, _data_->messages_length1, (GDestroyNotify) 
g_free), NULL);
-       _g_object_unref0 (_data_->connection);
-       _g_object_unref0 (_data_->test);
-       block1_data_unref (_data_->_data1_);
-       _data_->_data1_ = NULL;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
-               }
-       }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/generics/member-dup-destroy.c-expected b/tests/generics/member-dup-destroy.c-expected
index aba13ad02..339ea2bb5 100644
--- a/tests/generics/member-dup-destroy.c-expected
+++ b/tests/generics/member-dup-destroy.c-expected
@@ -243,21 +243,23 @@ foo_foo_async_co (FooFooAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _vala_assert (_data_->self->priv->g_type == G_TYPE_STRING, "typeof (G) == typeof (string)");
-       _vala_assert (_data_->self->priv->g_dup_func == ((GBoxedCopyFunc) g_strdup), "G.dup == 
(BoxedCopyFunc) string.dup");
-       _vala_assert (_data_->self->priv->g_destroy_func == ((GDestroyNotify) g_free), "G.destroy == 
(DestroyNotify) free");
-       _data_->g = NULL;
-       _vala_assert (_data_->self->priv->g_dup_func == ((GBoxedCopyFunc) g_strdup), "g.dup == 
(BoxedCopyFunc) string.dup");
-       _vala_assert (_data_->self->priv->g_destroy_func == ((GDestroyNotify) g_free), "g.destroy == 
(DestroyNotify) free");
-       ((_data_->g == NULL) || (_data_->self->priv->g_destroy_func == NULL)) ? NULL : (_data_->g = 
(_data_->self->priv->g_destroy_func (_data_->g), NULL));
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _vala_assert (_data_->self->priv->g_type == G_TYPE_STRING, "typeof (G) == typeof (string)");
+               _vala_assert (_data_->self->priv->g_dup_func == ((GBoxedCopyFunc) g_strdup), "G.dup == 
(BoxedCopyFunc) string.dup");
+               _vala_assert (_data_->self->priv->g_destroy_func == ((GDestroyNotify) g_free), "G.destroy == 
(DestroyNotify) free");
+               _data_->g = NULL;
+               _vala_assert (_data_->self->priv->g_dup_func == ((GBoxedCopyFunc) g_strdup), "g.dup == 
(BoxedCopyFunc) string.dup");
+               _vala_assert (_data_->self->priv->g_destroy_func == ((GDestroyNotify) g_free), "g.destroy == 
(DestroyNotify) free");
+               ((_data_->g == NULL) || (_data_->self->priv->g_destroy_func == NULL)) ? NULL : (_data_->g = 
(_data_->self->priv->g_destroy_func (_data_->g), NULL));
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -447,19 +449,21 @@ bar_async_co (BarAsyncData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _vala_assert (_data_->t_type == TYPE_FOO, "typeof (T) == typeof (Foo)");
-       _vala_assert (_data_->t_dup_func == ((GBoxedCopyFunc) g_object_ref), "T.dup == (BoxedCopyFunc) 
Object.@ref");
-       _vala_assert (_data_->t_destroy_func == ((GDestroyNotify) g_object_unref), "T.destroy == 
(DestroyNotify) Object.unref");
-       _vala_assert (_data_->t_dup_func == ((GBoxedCopyFunc) g_object_ref), "t.dup == (BoxedCopyFunc) 
Object.@ref");
-       _vala_assert (_data_->t_destroy_func == ((GDestroyNotify) g_object_unref), "t.destroy == 
(DestroyNotify) Object.unref");
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _vala_assert (_data_->t_type == TYPE_FOO, "typeof (T) == typeof (Foo)");
+               _vala_assert (_data_->t_dup_func == ((GBoxedCopyFunc) g_object_ref), "T.dup == 
(BoxedCopyFunc) Object.@ref");
+               _vala_assert (_data_->t_destroy_func == ((GDestroyNotify) g_object_unref), "T.destroy == 
(DestroyNotify) Object.unref");
+               _vala_assert (_data_->t_dup_func == ((GBoxedCopyFunc) g_object_ref), "t.dup == 
(BoxedCopyFunc) Object.@ref");
+               _vala_assert (_data_->t_destroy_func == ((GDestroyNotify) g_object_unref), "t.destroy == 
(DestroyNotify) Object.unref");
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static Block1Data*
diff --git a/tests/genie/class-abstract.c-expected b/tests/genie/class-abstract.c-expected
index 68b860a53..0a71d4504 100644
--- a/tests/genie/class-abstract.c-expected
+++ b/tests/genie/class-abstract.c-expected
@@ -395,7 +395,6 @@ test2_construct_finish (GAsyncResult* _res_)
 static gboolean
 test2_construct_co (Test2NewData* _data_)
 {
-       Test2* self = NULL;
        switch (_data_->_state_) {
                case 0:
                goto _state_0;
@@ -403,18 +402,21 @@ test2_construct_co (Test2NewData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->self = (Test2*) g_type_create_instance (_data_->object_type);
-       _data_->_tmp0_ = g_strdup ("b");
-       _g_free0 (_data_->self->b);
-       _data_->self->b = _data_->_tmp0_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               Test2* self = NULL;
+               _data_->self = (Test2*) g_type_create_instance (_data_->object_type);
+               _data_->_tmp0_ = g_strdup ("b");
+               _g_free0 (_data_->self->b);
+               _data_->self->b = _data_->_tmp0_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/methods/bug639054.c-expected b/tests/methods/bug639054.c-expected
index 4429c8ebb..a2132c64e 100644
--- a/tests/methods/bug639054.c-expected
+++ b/tests/methods/bug639054.c-expected
@@ -188,30 +188,32 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_data1_ = g_slice_new0 (Block1Data);
-       _data_->_data1_->_ref_count_ = 1;
-       _data_->_data1_->bar = _data_->bar;
-       _data_->_data1_->bar_length1 = _data_->bar_length1;
-       _data_->_data1_->baz = _data_->baz;
-       _data_->_data1_->_async_data_ = _data_;
-       _data_->f = ___lambda4__gsource_func;
-       _data_->f_target = block1_data_ref (_data_->_data1_);
-       _data_->f_target_destroy_notify = block1_data_unref;
-       _data_->f (_data_->f_target);
-       (_data_->f_target_destroy_notify == NULL) ? NULL : (_data_->f_target_destroy_notify 
(_data_->f_target), NULL);
-       _data_->f = NULL;
-       _data_->f_target = NULL;
-       _data_->f_target_destroy_notify = NULL;
-       block1_data_unref (_data_->_data1_);
-       _data_->_data1_ = NULL;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_data1_ = g_slice_new0 (Block1Data);
+               _data_->_data1_->_ref_count_ = 1;
+               _data_->_data1_->bar = _data_->bar;
+               _data_->_data1_->bar_length1 = _data_->bar_length1;
+               _data_->_data1_->baz = _data_->baz;
+               _data_->_data1_->_async_data_ = _data_;
+               _data_->f = ___lambda4__gsource_func;
+               _data_->f_target = block1_data_ref (_data_->_data1_);
+               _data_->f_target_destroy_notify = block1_data_unref;
+               _data_->f (_data_->f_target);
+               (_data_->f_target_destroy_notify == NULL) ? NULL : (_data_->f_target_destroy_notify 
(_data_->f_target), NULL);
+               _data_->f = NULL;
+               _data_->f_target = NULL;
+               _data_->f_target_destroy_notify = NULL;
+               block1_data_unref (_data_->_data1_);
+               _data_->_data1_ = NULL;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static Block2Data*
diff --git a/tests/methods/prepostconditions-captured.c-expected 
b/tests/methods/prepostconditions-captured.c-expected
index 7d8484f55..358fa7ef7 100644
--- a/tests/methods/prepostconditions-captured.c-expected
+++ b/tests/methods/prepostconditions-captured.c-expected
@@ -257,31 +257,33 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _vala_return_val_if_fail (_data_->i == 23, "i == 23", FALSE);
-       _data_->_data3_ = g_slice_new0 (Block3Data);
-       _data_->_data3_->_ref_count_ = 1;
-       _data_->_data3_->i = _data_->i;
-       _data_->_data3_->_async_data_ = _data_;
-       _data_->f = ___lambda6__func;
-       _data_->f_target = block3_data_ref (_data_->_data3_);
-       _data_->f_target_destroy_notify = block3_data_unref;
-       _data_->f (_data_->f_target);
-       _data_->result = _data_->_data3_->i;
-       _vala_warn_if_fail (_data_->_data3_->i == 42, "i == 42");
-       (_data_->f_target_destroy_notify == NULL) ? NULL : (_data_->f_target_destroy_notify 
(_data_->f_target), NULL);
-       _data_->f = NULL;
-       _data_->f_target = NULL;
-       _data_->f_target_destroy_notify = NULL;
-       block3_data_unref (_data_->_data3_);
-       _data_->_data3_ = NULL;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _vala_return_val_if_fail (_data_->i == 23, "i == 23", FALSE);
+               _data_->_data3_ = g_slice_new0 (Block3Data);
+               _data_->_data3_->_ref_count_ = 1;
+               _data_->_data3_->i = _data_->i;
+               _data_->_data3_->_async_data_ = _data_;
+               _data_->f = ___lambda6__func;
+               _data_->f_target = block3_data_ref (_data_->_data3_);
+               _data_->f_target_destroy_notify = block3_data_unref;
+               _data_->f (_data_->f_target);
+               _data_->result = _data_->_data3_->i;
+               _vala_warn_if_fail (_data_->_data3_->i == 42, "i == 42");
+               (_data_->f_target_destroy_notify == NULL) ? NULL : (_data_->f_target_destroy_notify 
(_data_->f_target), NULL);
+               _data_->f = NULL;
+               _data_->f_target = NULL;
+               _data_->f_target_destroy_notify = NULL;
+               block3_data_unref (_data_->_data3_);
+               _data_->_data3_ = NULL;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/objects/interface-abstract-async-override.c-expected 
b/tests/objects/interface-abstract-async-override.c-expected
index fb36b0a84..7de182e31 100644
--- a/tests/objects/interface-abstract-async-override.c-expected
+++ b/tests/objects/interface-abstract-async-override.c-expected
@@ -204,15 +204,17 @@ bar_real_foo_co (BarFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->result = 42;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->result = 42;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Bar*
diff --git a/tests/objects/interface-async-base-access.c-expected 
b/tests/objects/interface-async-base-access.c-expected
index a84c03a39..80afeae0c 100644
--- a/tests/objects/interface-async-base-access.c-expected
+++ b/tests/objects/interface-async-base-access.c-expected
@@ -253,15 +253,17 @@ bar_real_foo_co (BarFooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       reached = TRUE;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               reached = TRUE;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Bar*
@@ -545,19 +547,23 @@ foo_bar_co (FooBarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       IFOO_GET_INTERFACE (_data_->self)->foo (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST 
(_data_->self, TYPE_BAR, Bar), TYPE_IFOO, IFoo), foo_bar_ready, _data_);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               IFOO_GET_INTERFACE (_data_->self)->foo (G_TYPE_CHECK_INSTANCE_CAST 
(G_TYPE_CHECK_INSTANCE_CAST (_data_->self, TYPE_BAR, Bar), TYPE_IFOO, IFoo), foo_bar_ready, _data_);
+               return FALSE;
+       }
        _state_1:
-       IFOO_GET_INTERFACE (_data_->self)->foo_finish (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST 
(_data_->self, TYPE_BAR, Bar), TYPE_IFOO, IFoo), _data_->_res_);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               IFOO_GET_INTERFACE (_data_->self)->foo_finish (G_TYPE_CHECK_INSTANCE_CAST 
(G_TYPE_CHECK_INSTANCE_CAST (_data_->self, TYPE_BAR, Bar), TYPE_IFOO, IFoo), _data_->_res_);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Foo*
diff --git a/tests/objects/interface-async-captured-generic.c-expected 
b/tests/objects/interface-async-captured-generic.c-expected
index d0d0318ff..1a7153e41 100644
--- a/tests/objects/interface-async-captured-generic.c-expected
+++ b/tests/objects/interface-async-captured-generic.c-expected
@@ -147,19 +147,21 @@ ifoo_bar_co (IfooBarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _vala_assert (IFOO_GET_INTERFACE (_data_->self)->get_g_type (_data_->self) == G_TYPE_STRING, "typeof 
(G) == typeof (string)");
-       _vala_assert (g_strcmp0 (_data_->g, "foo") == 0, "g == \"foo\"");
-       _data_->_tmp0_ = ((_data_->g != NULL) && (IFOO_GET_INTERFACE (_data_->self)->get_g_dup_func 
(_data_->self) != NULL)) ? IFOO_GET_INTERFACE (_data_->self)->get_g_dup_func (_data_->self) ((gpointer) 
_data_->g) : ((gpointer) _data_->g);
-       ifoo_baz (_data_->self, _data_->_tmp0_);
-       ((_data_->g == NULL) || (IFOO_GET_INTERFACE (_data_->self)->get_g_destroy_func (_data_->self) == 
NULL)) ? NULL : (_data_->g = (IFOO_GET_INTERFACE (_data_->self)->get_g_destroy_func (_data_->self) 
(_data_->g), NULL));
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _vala_assert (IFOO_GET_INTERFACE (_data_->self)->get_g_type (_data_->self) == G_TYPE_STRING, 
"typeof (G) == typeof (string)");
+               _vala_assert (g_strcmp0 (_data_->g, "foo") == 0, "g == \"foo\"");
+               _data_->_tmp0_ = ((_data_->g != NULL) && (IFOO_GET_INTERFACE (_data_->self)->get_g_dup_func 
(_data_->self) != NULL)) ? IFOO_GET_INTERFACE (_data_->self)->get_g_dup_func (_data_->self) ((gpointer) 
_data_->g) : ((gpointer) _data_->g);
+               ifoo_baz (_data_->self, _data_->_tmp0_);
+               ((_data_->g == NULL) || (IFOO_GET_INTERFACE (_data_->self)->get_g_destroy_func (_data_->self) 
== NULL)) ? NULL : (_data_->g = (IFOO_GET_INTERFACE (_data_->self)->get_g_destroy_func (_data_->self) 
(_data_->g), NULL));
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
diff --git a/tests/objects/interface-virtual-override.c-expected 
b/tests/objects/interface-virtual-override.c-expected
index 46355cc97..e7ef6e89e 100644
--- a/tests/objects/interface-virtual-override.c-expected
+++ b/tests/objects/interface-virtual-override.c-expected
@@ -187,7 +187,9 @@ ifoo_real_bar_co (IfooBarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       g_assert_not_reached ();
+       {
+               g_assert_not_reached ();
+       }
 }
 
 void
@@ -302,15 +304,17 @@ bar_real_bar_co (BarBarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->result = 23;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->result = 23;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 Bar*
diff --git a/tests/objects/property-array-length.c-expected b/tests/objects/property-array-length.c-expected
index e41c57e99..aa07a2e8f 100644
--- a/tests/objects/property-array-length.c-expected
+++ b/tests/objects/property-array-length.c-expected
@@ -151,15 +151,17 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _vala_assert (_data_->data_length1 == 42, "data.length == 42");
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _vala_assert (_data_->data_length1 == 42, "data.length == 42");
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -198,26 +200,28 @@ bar_co (BarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = foo_new ();
-       _data_->f = _data_->_tmp0_;
-       _data_->_tmp2_ = 0;
-       _data_->_tmp1_ = foo_get_data (_data_->f, &_data_->_tmp2_);
-       _data_->_tmp1__length1 = _data_->_tmp2_;
-       _data_->_tmp3_ = _data_->_tmp1_;
-       _data_->_tmp3__length1 = _data_->_tmp1__length1;
-       _data_->_tmp4_ = _data_->_tmp3_;
-       _data_->_tmp4__length1 = _data_->_tmp3__length1;
-       foo (_data_->_tmp4_, (gint) _data_->_tmp3__length1, NULL, NULL);
-       _data_->_tmp4_ = (g_free (_data_->_tmp4_), NULL);
-       _foo_free0 (_data_->f);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = foo_new ();
+               _data_->f = _data_->_tmp0_;
+               _data_->_tmp2_ = 0;
+               _data_->_tmp1_ = foo_get_data (_data_->f, &_data_->_tmp2_);
+               _data_->_tmp1__length1 = _data_->_tmp2_;
+               _data_->_tmp3_ = _data_->_tmp1_;
+               _data_->_tmp3__length1 = _data_->_tmp1__length1;
+               _data_->_tmp4_ = _data_->_tmp3_;
+               _data_->_tmp4__length1 = _data_->_tmp3__length1;
+               foo (_data_->_tmp4_, (gint) _data_->_tmp3__length1, NULL, NULL);
+               _data_->_tmp4_ = (g_free (_data_->_tmp4_), NULL);
+               _foo_free0 (_data_->f);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
diff --git a/tests/parser/yield-return.c-expected b/tests/parser/yield-return.c-expected
index 11a23c41e..17aad7270 100644
--- a/tests/parser/yield-return.c-expected
+++ b/tests/parser/yield-return.c-expected
@@ -173,7 +173,6 @@ foo_construct_finish (GAsyncResult* _res_)
 static gboolean
 foo_construct_co (FooNewData* _data_)
 {
-       Foo* self = NULL;
        switch (_data_->_state_) {
                case 0:
                goto _state_0;
@@ -181,15 +180,18 @@ foo_construct_co (FooNewData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->self = (Foo*) g_type_create_instance (_data_->object_type);
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               Foo* self = NULL;
+               _data_->self = (Foo*) g_type_create_instance (_data_->object_type);
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 void
@@ -445,16 +447,18 @@ foo_co (FooData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_tmp0_ = g_strdup ("foo");
-       _data_->result = _data_->_tmp0_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = g_strdup ("foo");
+               _data_->result = _data_->_tmp0_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -512,20 +516,24 @@ bar_co (BarData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       foo_new (bar_ready, _data_);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               foo_new (bar_ready, _data_);
+               return FALSE;
+       }
        _state_1:
-       _data_->_tmp0_ = foo_new_finish (_data_->_res_);
-       _data_->result = _data_->_tmp0_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = foo_new_finish (_data_->_res_);
+               _data_->result = _data_->_tmp0_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void
@@ -583,20 +591,24 @@ baz_co (BazData* _data_)
                g_assert_not_reached ();
        }
        _state_0:
-       _data_->_state_ = 1;
-       foo (baz_ready, _data_);
-       return FALSE;
+       {
+               _data_->_state_ = 1;
+               foo (baz_ready, _data_);
+               return FALSE;
+       }
        _state_1:
-       _data_->_tmp0_ = foo_finish (_data_->_res_);
-       _data_->result = _data_->_tmp0_;
-       g_task_return_pointer (_data_->_async_result, _data_, NULL);
-       if (_data_->_state_ != 0) {
-               while (!g_task_get_completed (_data_->_async_result)) {
-                       g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+       {
+               _data_->_tmp0_ = foo_finish (_data_->_res_);
+               _data_->result = _data_->_tmp0_;
+               g_task_return_pointer (_data_->_async_result, _data_, NULL);
+               if (_data_->_state_ != 0) {
+                       while (!g_task_get_completed (_data_->_async_result)) {
+                               g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+                       }
                }
+               g_object_unref (_data_->_async_result);
+               return FALSE;
        }
-       g_object_unref (_data_->_async_result);
-       return FALSE;
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]