This fixes #7978.  It now correctly makes the devices stay in the devices tab.