Include undo data to startup checks and refactor them onto a function.

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