if we add a fd mapping with src and dest being the same, dup2 becomes a no-op and the fd gets closed; avoid that