Safer iorefSink (fix some failing tests)