Modify zend_scan_black to use tail-recursion