resolve BUGFIX use of uninitialized variable
diff --git a/src/resolve.c b/src/resolve.c
index e482611..e5d50b7 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -7252,7 +7252,9 @@
                     ++res_count;
                     ret = -1;
                 } else {
-                    ly_ilo_restore(ctx, prev_ilo, prev_eitem, 1);
+                    if (forward_ref) {
+                        ly_ilo_restore(ctx, prev_ilo, prev_eitem, 1);
+                    }
                     return -1;
                 }
             }