Game crash when pasting all I/O outputs []

I was editing a light switch and copied all connections using the button in the top right corner of the connections menu and when I pasted the connections in the switch off category the game crashed.

Steps to Reproduce

Use the copy all connections button and then try to use the paste all connections. (I only tested on a light switch, but not on other I/O objects, so I don’t know if this only affects light switches or not)

What I expected to happen

All the connections pasting.

What happened

The game crashed.