Fix --dump when there are state variables.