Repository: node
Issue: once event leak when forwarding events
Labels: events

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or output of `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` in PowerShell console (Windows)
Subsystem: if known, please specify affected core module name
-->

* **Version**: v14.15.3 and latest
* **Platform**: x86
* **Subsystem**:

### What steps will reproduce the bug?

The problem occurs when events from an EventEmitter B are forwarded to EventEmitter A. When emitting directly on A, once works properly. When emitting on B, the event is properly forwarded to A, but `once` fail to clean up the listener (however it does clean up the `error` event listener).

<!--
Enter details about your bug, preferably a simple code snippet that can be
run using `node` directly without installing third-party dependencies.
-->

Minimal reproduceable example:
```js
const { once, EventEmitter } = require('events')

async function run() {
  const A = new EventEmitter()
  const B = new EventEmitter()

  A.on('removeListener', (name, listener) => {
    console.log('remove', name)
    B.off(name, listener)
  })

  A.on('newListener', (name, listener) => {
    console.log('add', name)
    B.on(name, listener)
  })

  for (let i=0 ; i < 3 ; i++) {
    process.nextTick(() => {
      B.emit('e', 42)
    });

    console.log('before once', A._events['e'])
    const [value] = await once(A, 'e')
    console.log('after once', A._events['e'])
  }
}

run()
```

### How often does it reproduce? Is there a required condition?

### What is the expected behavior?

<!--
If possible please provide textual output instead of screenshots.
-->

```
before once undefined
add e
add error
remove error
remove e
after once undefined
before once undefined
add e
add error
remove error
remove e
after once undefined
before once undefined
add e
add error
remove error
remove e
after once undefined
```

### What do you see instead?

<!--
If possible please provide textual output instead of screenshots.
-->

```
before once undefined
add e
add error
remove error
after once [Function: bound onceWrapper] { listener: [Function: resolver] }
before once [Function: bound onceWrapper] { listener: [Function: resolver] }
add e
add error
remove error
after once [
  [Function: bound onceWrapper] { listener: [Function: resolver] },
  [Function: bound onceWrapper] { listener: [Function: resolver] }
]
before once [
  [Function: bound onceWrapper] { listener: [Function: resolver] },
  [Function: bound onceWrapper] { listener: [Function: resolver] }
]
add e
add error
remove error
after once [
  [Function: bound onceWrapper] { listener: [Function: resolver] },
  [Function: bound onceWrapper] { listener: [Function: resolver] },
  [Function: bound onceWrapper] { listener: [Function: resolver] }
]
```

### Additional information

<!--
Tell us anything else you think we should know.
-->