Fix bug in copying the metadata of a single var_dim dimension