make sure we don't shut uiautomator down if it's already gone (fix #1402)