Copying a matching value does not itself stop a loop. Put the early scan exit immediately after copying inside the successful branch. End closes a block; after the loop, Main continues. With the rule value >= 2, fallback 0 cannot be confused with a valid match.
Worked example
A faulty scan of [1, 3, 2] copies 3, then keeps scanning and copies 2. It reports 2, the last match, instead of the required first match 3. Stop after the first copy to preserve 3.
A robot left out one instruction
Faulty program: set result to 0; for each value in [1, 4, 2], if value >= 2, copy value to result; end If; end For each; report result. There is no Stop instruction. The task is to find the FIRST value at least 2. Use the given order; item numbers begin at 1.