Fix the attach behavior with -i Upstream-commit: bcce3cbdd1cb4d79272c0cbfa43ef0847be1b9d9 Component: engine