[checkpoint] Inline shared specs.
[checkpoint] Support nested checkpoints.