Prevent substring duplication when removing invalid blocks.  Remove trim so that tokens remain separated when 2Kb chunks are re-assembled.