Bugfix patch to prevent memory leaks and xdebug.max_nesting_level setting trip.
Replaced _run recursive call with a while loop.
Provides exactly the same functionality with the benefits of no longer gradually increasing memory usage of the PHP process while transcoding. No longer trips up on xdebug.max_nesting_level setting.
Thanks petewatts.