This fixes incompatibilities introduced by a new R version in d16c38a260 It also fixes #25315 as a result.
d16c38a260