Fix misuse of ForeignPtrs that caused corruption in code using CXString