PHP + cgi_buffer using LS API

I've been using cgi_buffer.php via auto_prepend on my server, due to it's support for ETag. I noticed on my dev box that if I compile PHP 4.3.11 using LS API support, that some of my scripts just stop working while cgi_buffer is enabled. It doesn't happen on all of the scripts, and disabling cgi_buffer and/or recompiling PHP using FastCGI solves the problem. I've produced it using both APC and Turck.

When it happens, PHP doesn't seem to crash. If I truss the process and then run the script, lseek() seems to return a EBADF and the PHP seems to call exit().