Fixed defect of unknown origin that allowed incorret nodes to be added to current shell.
Not sure what's changed here.