Similar reasoning to the change for EntityCache, sets are faster than attribute lookups (into types.) and isinstance (another global lookup). Updating the state is also very common, so it should be as fast as possible.