title: ValueHelpDialog error adding element with duplicate id
body: <p>The first time I open die ValueHelpDialog and chose an item there are no errors. However when I open the dialog again and click on the same entry I get the following error:</p>
  
  <blockquote>
    <p>Uncaught Error: Error: adding element with duplicate id
    'EQ5IPAKCZJMZR'
        at constructor.x.registerElement (Core-dbg.js:2711)...</p>
  </blockquote>
  
  <p>When I click again i get another error:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'getKey' of undefined
        at constructor.onVHOK (ValueHelper.js?eval:35)...</p>
  </blockquote>
  
  <p>When I click a third time it works without an error. </p>
  
  <p>I use   </p>
  
  <pre><code>this._dialog.close();
  this._dialog.destroy();
  </code></pre>
  
  <p>in the event handlers for the ok event as well as for the cancel event.</p>
  
  <p>Is the second error related to the first one? I thought closing and destroying the dialog would be enough to avoid those duplicate id errors.</p>
  
  <p>Edit: More code
  Controller:</p>
  
  <pre><code>this._ValueHelper = new ValueHelper();
  
  /* Calling valueHelper */
  onVH: function(oEvent) {
              this._ValueHelper.handleValueHelp(this, {
                  srcCtrl: oEvent.getSource()
              });
          },
  </code></pre>
  
  <p>ValueHelper.js:   </p>
  
  <pre><code>handleValueHelp: function(oController, mOptions) {
              if (mOptions == null) {
                  mOptions = {};
              }
  
              this._controller = oController;
              this._view = oController.getView();
              this._model = this._controller.getModel();
              this._callback = mOptions.fnCallback;
              this._srcCtrl = mOptions.srcCtrl;
              if (this._dialog != null) {
                  this._dialog.open();
              } else {
                  this._buildValueHelp();
              }
          },
  
  _buildValueHelp: function() {
              var oDialog = sap.ui.xmlfragment(
                  "xxx.view.fragments.valueHelper.ValueHelp",
                  this
              );
              this._view.addDependent(oDialog);
              this._dialog = oDialog;
  
              this._registerEnterEvent(oDialog);
              var oTable = sap.ui.xmlfragment(
                  "xxx.view.fragments.valueHelper.ValueHelpTable",
                  this
              );
              this._table = oTable;
              oDialog.setTable(oTable);
              oDialog.open();
          },
  
  onVHOK: function(oEvent) {
              var sId = oEvent.getParameter("tokens")[0].getKey();
  
              this._handleOk(sId);
  
              this._dialog.close();
              /*this._dialog.destroy();*/
          },
  
  onVHClose: function() {
              this._dialog.close();
              /*this._dialog.destroy();*/
          },
  </code></pre>
  
  <p>ValueHelp.fragment:</p>
  
  <pre><code>&lt;core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:vh="sap.ui.comp.valuehelpdialog" xmlns:fb="sap.ui.comp.filterbar"&gt;
      &lt;vh:ValueHelpDialog  key="id" ok="onVHOK" cancel="onVHClose" selectionChange="onVHSelectionChange"
          title="Car" supportMultiselect="false" supportRanges="false" supportRangesOnly="false" descriptionKey="Car"&gt;
          &lt;vh:filterBar&gt;
              &lt;fb:FilterBar advancedMode="true" filterBarExpanded="true" search="onVHShipSearch"&gt;
                  &lt;fb:filterGroupItems&gt;
                      &lt;fb:FilterGroupItem groupName="car" name="n1" label="Name"&gt;
                          &lt;fb:control&gt;
                              &lt;Input  /&gt;
                          &lt;/fb:control&gt;
                      &lt;/fb:FilterGroupItem&gt;
                      &lt;fb:FilterGroupItem groupName="car" name="n2" label="imnr"&gt;
                          &lt;fb:control&gt;
                              &lt;Input/&gt;
                          &lt;/fb:control&gt;
                      &lt;/fb:FilterGroupItem&gt;
                  &lt;/fb:filterGroupItems&gt;
              &lt;/fb:FilterBar&gt;
          &lt;/vh:filterBar&gt;
      &lt;/vh:ValueHelpDialog&gt;
  &lt;/core:FragmentDefinition&gt;
  </code></pre>
  
  <p>ValueHelpTable.fragment:</p>
  
  <pre><code>&lt;core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:t="sap.ui.table"&gt;
      &lt;t:Table rows="{path: '/Cars'}"  selectionBehavior="Row" selectionMode="Single"&gt;
          &lt;t:columns&gt;
              &lt;t:Column&gt;
                  &lt;t:label&gt;
                      &lt;Label text="Number"/&gt;
                  &lt;/t:label&gt;
                  &lt;t:template&gt;
                      &lt;Text text="{ path: 'number', formatter: '.formatter.leadingZeroes' }"/&gt;
                  &lt;/t:template&gt;
              &lt;/t:Column&gt;         
              &lt;t:Column&gt;
                  &lt;t:label&gt;
                      &lt;Label text="Name"/&gt;
                  &lt;/t:label&gt;
                  &lt;t:template&gt;
                      &lt;Text text="{name}"/&gt;
                  &lt;/t:template&gt;
              &lt;/t:Column&gt;
              &lt;t:Column&gt;
                  &lt;t:label&gt;
                      &lt;Label text="imnr"/&gt;
                  &lt;/t:label&gt;
                  &lt;t:template&gt;
                      &lt;Text text="{imnr}"/&gt;
                  &lt;/t:template&gt;
              &lt;/t:Column&gt;
          &lt;/t:columns&gt;
      &lt;/t:Table&gt;
  &lt;/core:FragmentDefinition&gt;
  </code></pre>