Slight optimization in state handling (one less dictionary copy)