                 # Files that exist locally and remotely and need to be checked
                 # for sameness.
                 unknown.push
-                    local: local_map[f.Key]
+                    local: local_map.get(f.Key)
                     remote: f
 
         for k,v of local_map
-            unless remote_map[k]
+            unless remote_map.has(k)
                 # Files that exist locally but not remotely and definitely need
                 # to be uploaded.
                 changed.push


            # Ignore files that don't exist locally when deleting of remote
            # files is disabled.
            if options.no_delete and not local_map[f.Key]
                return

            remote_map[f.Key] = true
            unless local_map[f.Key]?
                # Files that don't exist locally and need to be deleted from
                # the remote deployment.
                deleted.push

            return not key.match(root_prefix_exp)?
        return false

    local_map = new Map()
    remote_map = new Set()
    local_files.forEach (f) ->
        key = f.replace(build_directory, '').substring(1)
        unless _isIgnorable(key)
            local_map.set(key, {
                local_path: f
                key: key
            })

    if options.no_delete
        callback(
            changed: Array.from(local_map.values()).map (v) -> { local: v, remote: null }
            deleted: []
            unchanged: []
        )
