Fixed loop device teardown in sys-apps/auto-swap