Improve feedback in case of UndefinedBehaviorError.
Merge pull request #1199 from sjrd/improve-undef-behavior-feedback

Improve feedback in case of UndefinedBehaviorError.
Fix #1171: Split: Sometimes remove leading empty match

The conditions were determined experimentally since the JavaDoc is
note precise enough.
Merge pull request #1198 from gzm0/fix-regex

Fix #1171: Split: Sometimes remove leading empty match