Fixes #165: Don't rewind a stream when it's not needed.