Ensure variables are declared at the top of the block. https://bugzilla.gnome.org/show_bug.cgi?id=785767