[Debug] less intrusive work around for https://bugs.php.net/54275