Fix an assertion failure in restarts

Also make predict treat restarts more exactly.