         for (index, place) in displayedPlaces.enumerated() {
             placesMap[place.id] = index
         }
-        self.placeKeyMap = placesMap
+        self.placeKeyToDisplayedPlacesIndexMap = placesMap
     }
 
     func place(forKey key: String, callback: @escaping (Place?) -> ()) {

            for (index, place) in displayedPlaces.enumerated() {
                placesMap[place.id] = index
            }
            placeKeyMap = placesMap
        }
    }

    /// A mapping from place key to index in `displayedPlaces` - this must update when
    /// `displayedPlaces` does.
    fileprivate var placeKeyMap = [String: Int]()

    /// Protects allPlaces, displayedPlaces, and placeKeyMap.
    fileprivate let placesLock = NSLock()


    func previousPlace(forPlace place: Place) -> Place? {
        return self.placesLock.withReadLock {
            guard let currentPlaceIndex = self.placeKeyToDisplayedPlacesIndexMap[place.id],
                currentPlaceIndex > displayedPlaces.startIndex else { return nil }

            return displayedPlaces[displayedPlaces.index(before: currentPlaceIndex)]
