docs: def _add_markers(self, markers, tar, files_in_layers, added_symlinks):
          """
          This method is responsible for adding back all markers that were not
          added to the squashed layer AND files they refer to can be found in layers
          we do not squash.
          """
  
          if markers:
              self.log.debug("Marker files to add: %s" %
                             [o.name for o in markers.keys()])
          else:
              # No marker files to add
              return
  
          # https://github.com/goldmann/docker-squash/issues/108
          # Some tar archives do have the filenames prefixed with './'
          # which does not have any effect when we unpack the tar achive,
          # but when processing tar content - we see this.
          tar_files = [self._normalize_path(x) for x in tar.getnames()]
  
          for marker, marker_file in six.iteritems(markers):
              actual_file = marker.name.replace('.wh.', '')
              normalized_file = self._normalize_path(actual_file)
  
              should_be_added_back = False
  
              if self._file_should_be_skipped(normalized_file, added_symlinks):
                  self.log.debug(
                      "Skipping '%s' marker file, this file is on a symlink path" % normalized_file)
                  continue
  
              if normalized_file in tar_files:
                  self.log.debug(
                      "Skipping '%s' marker file, this file was added earlier for some reason..." % normalized_file)
                  continue
  
              if files_in_layers:
                  for files in files_in_layers.values():
                      if normalized_file in files:
                          should_be_added_back = True
                          break
              else:
                  # There are no previous layers, so we need to add it back
                  # In fact this shouldn't happen since having a marker file
                  # where there is no previous layer does not make sense.
                  should_be_added_back = True
  
              if should_be_added_back:
                  self.log.debug(
                      "Adding '%s' marker file back..." % marker.name)
                  # Marker files on AUFS are hardlinks, we need to create
                  # regular files, therefore we need to recreate the tarinfo
                  # object
                  tar.addfile(tarfile.TarInfo(name=marker.name), marker_file)
                  # Add the file name to the list too to avoid re-reading all files
                  # in tar archive
                  tar_files.append(normalized_file)
              else:
                  self.log.debug(
                      "Skipping '%s' marker file..." % marker.name)