Rearrange layerstore locking Upstream-commit: 900c8f5847b9f6a51a4a1a3d03631bad7b3149db Component: engine