Removing reliance on undefined behavior

Replacing the assumption that keys will be enumerated in the order they
were added to Dictionary<,> with an explicit ordering based on a
timestamp recorded and atomically incremented when tracking an instance.