account for return value in In.read instrumentation

@marco-c I haven't tested this yet, but I think it's correct.

I haven't seen that, but this code accounts for the possibility.