private Namespace getScope(final int index) {
		final AtomicReference<Namespace> ref = new AtomicReference<>();
		runSwing(() -> {
			int count = namespacesComboBox.getItemCount();
			if (count <= index) {
				System.err.println("Available namespaces: ");
				for (int i = 0; i < count; i++) {
					System.err.println("\t" + namespacesComboBox.getItemAt(i));
				}
				throw new IllegalArgumentException("No namespace at index: " + index);
			}

			Object selectedItem = namespacesComboBox.getItemAt(index);
			Namespace ns = ((AddEditDialog.NamespaceWrapper) selectedItem).getNamespace();
			ref.set(ns);
		});
		return ref.get();
	}
Catches the issue where the user could not move a label within a
namespace under the Global namespace to directly under the Global
namespace.

see Tracker ID 901
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/label/AddEditDialoglTest.java