/**
  * Removes the given record from the set.
  * @param ref object $record A {@link DMRecord} object.
  * @access public
  * @return void
  */
 function removeRecord($record)
 {
     $id = $record->getID();
     parent::removeRecord($record);
     // now remove the $id from our internal list, if it's there.
     if (in_array($id, $this->_storedRecordIDs)) {
         $new = array();
         foreach ($this->_storedRecordIDs as $rID) {
             if ($id != $rID) {
                 $new[] = $rID;
             }
         }
         $this->_storedRecordIDs = $new;
     }
     // and this list, to avoid messing up numRecords().
     if (in_array($id, $this->_fetchedIDs)) {
         $new = array();
         foreach ($this->_fetchedIDs as $rID) {
             if ($id != $rID) {
                 $new[] = $rID;
             }
         }
         $this->_fetchedIDs = $new;
     }
 }