Added aspect for fixing corrupted sequences after DB crash, issue #635.