As per the comments in https://github.com/OrchardCMS/Orchard/pull/6159, the issue was that the layout designer host has a dependency on the layout editor object, but the former would be created before the latter.
This changeset moves the initialization code together in order to control the order in which what object is created first.