Applying on original container when in container networking mode

When a container is set to use the same network stack of another container, let operations directly apply on the original container to prevent unnecessary error and redundant (and also useless) links.