Step 3 is unconditional, so the instructions try to send every shape to SQUARE, including a shape already placed in ROUND.
A corrected branch is: if round, ROUND; otherwise if square, SQUARE; otherwise OTHER. Then repeat with the next shape.
Circle goes to ROUND, square to SQUARE, triangle to OTHER.