Fix bug 19740; round-tripping a pointer through a stream doesn't work