The state in mocked static objects is not cleaned up when an exception is caught by PHPUnit

See issue https://github.com/sebastianbergmann/phpunit/issues/1143 for details