Fix library group selection after losing focus