Handle edge case in RegexExtractor, fixes #708