fix layout fixup for messages block with layout cache enabled