This avoids the segfault, but it will not make writing to the SplFileObject during output shutdown work.