Index: H5Tconv.c
===================================================================
--- H5Tconv.c	(revision 154119)
+++ H5Tconv.c	(revision 154120)
@@ -1961,11 +1961,31 @@
                 H5T_t	*type;
 
                 type = H5T_copy(src->shared->u.compnd.memb[i].type, H5T_COPY_ALL);
+
+                /* we don't need to keep the location (file) information; doing
+                 * so causes H5G_name_replace_cb() to try to rename datatypes
+                 * held in the global list for files that have been closed.
+                 */
+                if(H5O_loc_free(&type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+                if(H5O_loc_reset(&type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+
                 tid = H5I_register(H5I_DATATYPE, type, FALSE);
                 HDassert(tid >= 0);
                 priv->src_memb_id[i] = tid;
 
                 type = H5T_copy(dst->shared->u.compnd.memb[src2dst[i]].type, H5T_COPY_ALL);
+
+                /* we don't need to keep the location (file) information; doing
+                 * so causes H5G_name_replace_cb() to try to rename datatypes
+                 * held in the global cache for files that have been closed.
+                 */
+                if(H5O_loc_free(&type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+                if(H5O_loc_reset(&type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+
                 tid = H5I_register(H5I_DATATYPE, type, FALSE);
                 HDassert(tid >= 0);
                 priv->dst_memb_id[src2dst[i]] = tid;
@@ -2994,7 +3014,19 @@
             if(NULL == (tpath = H5T_path_find(src_parent, dst, NULL, NULL, dxpl_id, FALSE))) {
 	        HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype")
             } else if(!H5T_path_noop(tpath)) {
-                if((src_parent_id = H5I_register(H5I_DATATYPE, H5T_copy(src_parent, H5T_COPY_ALL), FALSE)) < 0) 
+                H5T_t *src_parent_type;
+                src_parent_type = H5T_copy(src_parent, H5T_COPY_ALL);
+
+                /* we don't need to keep the location (file) information; doing
+                 * so causes H5G_name_replace_cb() to try to rename datatypes
+                 * held in the global list for files that have been closed.
+                 */
+                if(H5O_loc_free(&src_parent_type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+                if(H5O_loc_reset(&src_parent_type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+
+                if((src_parent_id = H5I_register(H5I_DATATYPE, src_parent_type, FALSE)) < 0) 
                     HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion")
 
                 /* Convert the data */
@@ -3156,8 +3188,26 @@
             if(NULL == (tpath = H5T_path_find(src->shared->parent, dst->shared->parent, NULL, NULL, dxpl_id, FALSE)))
                 HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatypes")
             else if(!H5T_path_noop(tpath)) {
-                if((tsrc_id = H5I_register(H5I_DATATYPE, H5T_copy(src->shared->parent, H5T_COPY_ALL), FALSE)) < 0 ||
-                        (tdst_id = H5I_register(H5I_DATATYPE, H5T_copy(dst->shared->parent, H5T_COPY_ALL), FALSE)) < 0)
+                H5T_t *src_type, *dst_type;
+
+                src_type = H5T_copy(src->shared->parent, H5T_COPY_ALL);
+                dst_type = H5T_copy(dst->shared->parent, H5T_COPY_ALL);
+
+                /* we don't need to keep the location (file) information; doing
+                 * so causes H5G_name_replace_cb() to try to rename datatypes
+                 * held in the global list for files that have been closed.
+                 */
+                if(H5O_loc_free(&src_type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+                if(H5O_loc_reset(&src_type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+                if(H5O_loc_free(&dst_type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+                if(H5O_loc_reset(&dst_type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+
+                if((tsrc_id = H5I_register(H5I_DATATYPE, src_type, FALSE)) < 0 ||
+                        (tdst_id = H5I_register(H5I_DATATYPE, dst_type, FALSE)) < 0)
                     HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion")
             } /* end else-if */
             else
@@ -3476,8 +3526,26 @@
             if(NULL == (tpath = H5T_path_find(src->shared->parent, dst->shared->parent, NULL, NULL, dxpl_id, FALSE))) {
                 HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatypes")
             } else if (!H5T_path_noop(tpath)) {
-                if((tsrc_id = H5I_register(H5I_DATATYPE, H5T_copy(src->shared->parent, H5T_COPY_ALL), FALSE)) < 0 ||
-                        (tdst_id = H5I_register(H5I_DATATYPE, H5T_copy(dst->shared->parent, H5T_COPY_ALL), FALSE)) < 0)
+                H5T_t *src_type, *dst_type;
+
+                src_type = H5T_copy(src->shared->parent, H5T_COPY_ALL);
+                dst_type = H5T_copy(dst->shared->parent, H5T_COPY_ALL);
+
+                /* we don't need to keep the location (file) information; doing
+                 * so causes H5G_name_replace_cb() to try to rename datatypes
+                 * held in the global list for files that have been closed.
+                 */
+                if(H5O_loc_free(&src_type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+                if(H5O_loc_reset(&src_type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+                if(H5O_loc_free(&dst_type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+                if(H5O_loc_reset(&dst_type->oloc) < 0)
+                    HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "failed to remove location from converter data type copy")
+
+                if((tsrc_id = H5I_register(H5I_DATATYPE, src_type, FALSE)) < 0 ||
+                        (tdst_id = H5I_register(H5I_DATATYPE, dst_type, FALSE)) < 0)
                     HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion")
             }
 
