Workaround for #907.
Merge pull request #935 from OliverLetterer/cfstream-race-condition

Workaround for #907.