diff --git a/src/compiler.cpp b/src/compiler.cpp index 99b647c2bb..64ced76ac2 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -1008,7 +1008,7 @@ trySteal(Context* c, Register* r, Stack* stack) unsigned count = 0; Stack* start = 0; for (Stack* s = stack; s and (not s->pushed); s = s->next) { - if (s->value == v) { + if (start == 0 and s->value == v) { start = s; } if (start) {