Fix Issue 7942 - Appending different string types corrupts memory