text: Title: Initially empty test fails even if pre-run modifier adds content to it
  Body: It seems that adding a keyword to an empty test case fails when using prerunmodifier. Below example was working with RF 6.0.2, but not any more with 6.1.1. If test case has some keywords in it, then the modifier works fine.
  
  .robot file
  
  ```
  *** Test Cases ***
  Pass with Log
      # Modifier adds keyword to this test case
      Log    Hello from .robot
  
  Pass with Modifier
      # Modifier fails to add keyword
      # Log    Hello from .robot
  ```
  k.py file
  ```python
  from robot.api import SuiteVisitor
  from robot.running.model import Keyword
  
  
  class K(SuiteVisitor):
      def start_suite(self, suite):
          for test in suite.tests:
              kw = Keyword('Log', args=['Hello from MODIFIER'])
              test.body.append(kw)
  
      def start_keyword(self, keyword: Keyword) -> bool | None:
          print(f'KEYWORD: {keyword.parent.name}:{keyword.name}')
  ```
  run `robot --pythonpath .  --prerunmodifier k.K .` 