Fix crashes and memory corruptions in bundle hasher.