Fix read overrun handling, broken by using wrong variable.

MFC after:	3 days