Merge "Add flag for read/write flags in layout files" into main