Function flattenAllSchemaBlocks