endGroups() {
    for (; this.undefStack.length > 0; )
      this.endGroup();
  }
Set the current value of a name, and optionally set it globally too.
Local set() sets the current value and (when appropriate) adds an undo
operation to the undo stack.  Global set() may change the undo
operation at every level, so takes time linear in their number.
A value of undefined means to delete existing definitions.