Seeing this same logic in a number of places really makes it clear we need to generalize this nested state concept.