Fixed a bug when setting the charOffsetEnd in
PatternCaptureGroupTokenFilter and added a checkRandomData() test