ReplaceIdRefs