 	/// In the event of an identifier overflow (highly, highly unlikely), this
 	/// will reset all current identifiers to reclaim a contiguous set of
 	/// available identifiers for the future.
-	private mutating func reindex() {
+	private func reindex() {
 		for i in 0..<elements.endIndex {
 			currentIdentifier = UInt(i)
 

}

/// An unordered, non-unique collection of values of type `Element`.
internal struct Bag<Element> {
	private var elements: [BagElement<Element>] = []
	private var currentIdentifier: UInt = 0

	/// Inserts the given value in the collection, and returns a token that can
	/// later be passed to removeValueForToken().
	mutating func insert(value: Element) -> RemovalToken {
		let nextIdentifier = currentIdentifier &+ 1
		if nextIdentifier == 0 {
			reindex()

	/// Removes a value, given the token returned from insert().
	///
	/// If the value has already been removed, nothing happens.
	func removeValueForToken(token: RemovalToken) {
		if let identifier = token.identifier {
			// Removal is more likely for recent objects than old ones.
			for i in (0..<elements.endIndex).reverse() {
