be more robust against changes in value of R_PACKRAT_MODE