nir/gcm: fix a bug with metadata handling