text: Title: WHILE limit doesn't work in teardown
  Body: ### Description
  My original source is test run failure. Tests ran using a docker container and run stopped when container exited with code 137. Trying to simplify the test that lead to the steps given below. I'm seeing execution get stuck in Test Teardown. 
  
  ### Steps to reproduce
  1. Open terminal and create a test suite file `stuck.robot` with content
  ```
  *** Keywords ***
  My Teardown
      WHILE  True  limit=3
          Log To Console  Sleep 1 second
          Sleep  1
      END
  
  
  *** Test Cases ***
  My Test
      No Operation
      [Teardown]    My Teardown
  ```
  2. Run test: `robot stuck.robot`
  
  ### Actual results
  Robot output looks normal until while loop limit is reached:
  ```
  ==============================================================================
  Stuck
  ==============================================================================
  My Test                                                               .Sleep 1 second
  Sleep 1 second
  Sleep 1 second
  ```
  Then robot appears stuck. Host resource monitor indicates high CPU usage. It is possible to force exit by hitting `CTRL+C` more than once.
  
  ### Reproducibility
  Reproduced 10 times out of 10 on my local PC (first one in the list below). On other systems, reproduced on first try.
  
  ### Tested versions
  * Windows 11 PC running WSL: Ubuntu 20.04.6 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
      * Robot Framework 6.0.2 , Python 3.8.10
      * Robot Framework 6.1a1 , Python 3.8.10
  * Ubuntu 22.04 LTS system
      * _need to collect version info later_
  * MacBook Pro
      * Robot Framework 6.0.2, Python 3.10.5
  