msvcrt: sharing violation caused by duplicated hande in _get_osfhandle