Fixes #3707. Reverts detach behaviour.