Fix resumable catch-up hashing bug, add tests