thin_metadata_size: add an index variable to init_units and fiy a message type