Fixed decoding in the case of fragmented delimiters #3306

 - also improved tests
Merge pull request #1403 from drewhk/wip-3306-fragmented-delimiter-drewhk

Fixed decoding in the case of fragmented delimiters #3306