Restore before checking input entities at startup
Originally input entities were checked at startup before possibly restoring state of the composite entity. This could cause an input entity with data older than the most recent data the composite used before shutdown to temporarily cause the composite to use that old data and abort the restore process. However, the restore process should happen first, so that input data older than the restored state can be properly reject. This release reverses those processes so that restoring happens first.