A mere reference to stderr prevents the issue.  Trying to catch whatever happens without using stderr.