core/socket: do not assign another fd to SocketPort which already has a fd on deserialization
Otherwise, if a socket address is duplicated, then the previous fd is
closed.
Fixes #19843.
(cherry picked from commit 3da0caf5)
(cherry picked from commit 11acee8a)
(cherry picked from commit 1f5600df)