title: tableView shows duplicate values
body: <p>I have a search bar where I search for users. When I first search for a user, it displays the correct result. But when I move to the detailed view (to the user's profile), tap any button there, and move back, the value triplicates. It doesn't affect the result when I move, don't tap on any button, and move back. Here are the code snippets that I use:</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
  
      searchController.searchBar.delegate = self
      searchController.dimsBackgroundDuringPresentation = false
      searchController.searchBar.placeholder = "Search people (by username)"
      definesPresentationContext = true
      tableView.tableHeaderView = searchController.searchBar
  
      requestManager.delegate = self
  }
  
  func updateSearchResults(_ sender: RequestManager) {
      tableView.reloadData()
  }
  
  func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
  
          requestManager.resetSearch()
          requestManager.searchUser(validatedText)
          print("Validated text: \(validatedText)")
  }
  
  func searchUser(_ searchText: String) {
          refUsers.observe(.value, with: { (snapshot) in
  
              let snapshotDictionary: [String: AnyObject] = snapshot.value as! [String : AnyObject]
  
              for (userKey, _) in snapshotDictionary {
  
                  if let usernameValue = snapshot.childSnapshot(forPath: userKey).childSnapshot(forPath: "username").value as? String
                  {
                      if usernameValue.lowercased().contains(searchText.lowercased()) {
                          let userData = JSON(snapshot.childSnapshot(forPath: userKey).value!)
  
  
                          self.searchUsers.append(userData)
                      }
  
                      if self.delegate != nil {
                          self.delegate?.updateSearchResults(self)
                      }
  
                  }
                  else {
                      print("Users could not be found.")
                  }
  
              }
  
          }) { (error) in
              print(error.localizedDescription)
          }
  
  }
  </code></pre>
  
  <p>What seems to be calling the result thrice when I move back from the detail view? None of the functions here are in the detail view. </p>