Fix stream includes throwing errors during global state preservation

Related to issue #1308.

I wasn't sure exactly where to write tests for this. Any guidance would be appreciated!