Parallellize restoring objects from the state file.

Fixes #6226
Test.