Adds support for deep history states.