     /// Helper method to improve decoding speed for large objects:
     /// method returns index map to read value for key without enumerating through all the items
     private static func propertiesIndexMapForType(type: Any.Type, value: CoderTreeValue) -> [String: Int] {
-        for mapInfo in indexMaps {
-            if mapInfo.type == type {
-                return mapInfo.map
-            }
+        if let map = typesHolder.typeMap(forType: type) {
+            return map
         }
 
         func buildIndexMap(items: [CoderTreeValue]) -> [String: Int] {

    let type: Any.Type
    let map: [String: Int]
}
private var indexMaps = [TypeIndexMap]()

/**
    A CerealDecoder handles decoding items that were encoded by a `CerealEncoder`.

        switch value {
        case let .IdentifyingTree(_, items):
            let map = buildIndexMap(items)
            typesHolder.save(map: map, forType: type)
            return map

        case let .SubTree(items):
            let map = buildIndexMap(items)
            typesHolder.save(map: map, forType: type)
            return map
        default:
            return [:]
