Fix access to resultsets outside of scope for streams.