An OrderedSet is a custom MutableSet that remembers its order, so that every
entry has an index that can be looked up.
