Fixed memory corruption in inverse RDFT for some backends