Spawned from bug 92569; when the code that calls calculateLayerBounds should probably pass ExcludeHiddenDescendants. calculateLayerBounds should probably also pass 'flags' straight down through the recursive calls.
These flags seem unused: IncludeSelfTransform = 1 << 0, UseLocalClipRectIfPossible = 1 << 1, IncludeLayerFilterOutsets = 1 << 2,