LPS-40207 Modify logic in LayoutStagingImpl.isBranchingLayoutSet() to sh...

...ortcut heavy operations.