Fix up state transition stuff to not get confused by new having no
last states.