Don't load dynamic layout twice unless needed

When a change alters the layout, we load it twice -- once with
all the config repos so we can check syntax, and a second time
without them (because we don't want to run with unmerged config
repo changes) to generate the layout we actually use.

In the case where there are no untrusted config changes involved,
we will end up producing a layout that's identical to what we would
have used if we didn't generate a new one.  And in the case where
there are no trusted config changes involved, the layout we generate
for syntax checking won't be any different than the one we generate
to use.

So in these cases, only generate the layout once.  If a stack involves
both trusted and untrusted changes, we will still generate it twice.

Change-Id: Ic97b54af6e4e598225dc65aa3140fb8f1dcfb28e
2 files changed