The memory violation with the long serialize-name is a bug.  Please report it to Tech Support.  We don't impose a limit on the length of serialize-name, and the very long serialize-name causes a buffer overrun during WRITE-XML.  The fix for this would be to impose a 128 character limit on SERIALIZE-NAME, the same limit we use for dynamic temp-table field-names.