r3d: fix an invalid read introduced in 6bf4c1d