Fixed false positive #5976: Properly handle shift from stream.