The pattern (?(?=.*b)b|^) was incorrectly processed as requiring a match at the start of the subject or after a newline.
Changed paths: