Commit f65de1019dca6398097751abefcad7e1a4637551 on the emacs-30 branch fixes the issue. Seems the change was meant for librsvg 2.59.x rather than 2.58.x.