Fix top slot calculation for snapshots with continuations.
Merge branch 'master' into agentzh