Looks like a bug to me. The problem is here...
https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/Stream.cpp#L240
c is either -1 (indicating a time-out) or a value less than 0x0100 (indicating a valid character). In your example, terminator is sign extended to 0xFF80 before the comparison so it can never match c.