Minimize simulator stack consumption.

... in order to avoid overflowing the process stack in highly
recursive scenarios.