Include undo data to startup checks, refactoring them onto a function.

The check is now simpler, and more efficient, and
covers more data, to be sure the node can reorganize.