account for return value in In.read instrumentation

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