So, I fixed the problem, but the cause is still a mystery.
It turns out that the PHP zlib.output_compression setting WAS turned on for this script, which is surprising because I explicitly disabled in the site's .htaccess, and it's not in the "Apache-style settings" in the Litespeed control...