Lexer: Check curStr is actually a Stream before doing Stream operations

Bug #104518
1 file changed