Explictly specify the size of the layout enum (uint32_t). Fixed a bug where metadata_offset was left undefined.