As another attempt at this, I changed the text field on the layout to be a merger field. This had the same result...
Trim and TrimAll remove spaces. Can you add a Substitute somewhere to remove carriage returns?
Have you checked to see if there are carriage returns or other such characters at the end of the Trim item?