Stateless form infinite loop

Stateless form infinite loop

I have a stateless form with a lookup field. When I choose an item from the lookup the corresponding record is fetched and some other fields on the form are populated with the fetched data. This works correctly. However if I set a value for the lookup in the On Load section it then goes into an infinite loop.

As an experiment I added a radio button that selects a value for the lookup. This also works correctly. It is just when the lookup is selected in the on Load section that causes the infinite loop.

Is there a way  to select the value in the On Load section without causing a loop?