Replace `BTreeSet` in `IndexedMap` with sorted `Vec`