fix condition for layout invalidation
Merge pull request #214 from gretzki/fix-layout-invalidation-flow-layout

fix condition for layout invalidation